Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: zumbabumba
  • Content: Threads
  • Order by date
  1. zumbabumba

    sorting arrays ignoring square brackets

    Hi all. Is there any efficient way to sort arrays ignoring square brackets and/or other characters? Suppose you have: @names = ('[Ca]rl', 'Bil[l]y', 'Alan'); I want the output of sort @names be: Alan Bil[l]y [Ca]rl. The standard sort outputs [Ca]rl Alan Bil[l]y beacuse square brackets come...
  2. zumbabumba

    regex and logical operator odd behaviour in extracting text

    Hi all. I want to extract words from a text file using regular expression, working line by line, and giving them a line number. Here is my code: #!/usr/local/bin/perl $line = "line1. to be or not to be, that is the question"; @wordsinline = split(/\s+/, $line); foreach $word (@wordsinline){...
  3. zumbabumba

    splitting texts into words

    Hi there, I'm new to perl. I wrote a script to split two pieces of poetry into words, but something wrong happen. Here is the .txt file to be processed: Text 1. line 1. Tiger, Tiger, burning bright line 2. in the forest of the night Text 2. line 1. To be, or not to be line 2. that is the...

Part and Inventory Search

Back
Top