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!

Recent content by zumbabumba

  1. zumbabumba

    sorting arrays ignoring square brackets

    Thanks Ishnid! It works very well. Now I just have to understand what a Schwarzian Transform is:).
  2. 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...
  3. zumbabumba

    regex and logical operator odd behaviour in extracting text

    Thanks Franco! Beautyful and elegant script man :). I don't understand it completely, but I will try to find some explanation over the internet.
  4. zumbabumba

    regex and logical operator odd behaviour in extracting text

    Thanks for your answer Spookie. Well I just want that the script recognizes the presence of line notation, and when that is not present it should output an error. I don't need something like: I want Perhaps I should use some other command, but by now my knowledge of perl is unfortunately...
  5. 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){...
  6. zumbabumba

    splitting texts into words

    Useful tip. Thanks ChrisHunt!
  7. zumbabumba

    splitting texts into words

    Great! Thank you for your help. Now I'm going to work to the second part of my project, that is a script that makes a text index. Something like this: INDEX be 2, 1 bright 1, 1 burning 1, 1 forest 1, 2 in 1, 2 is 2, 2 night 1, 2 not 2, 1 of 1, 2 or 2, 1 question 2, 2 that 2, 2 the 1, 2; 2, 2...
  8. 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