in reply to searching the strings
Let's see if I understood everything:
foreach (@w) { print "working with $_... "; /^>>/ and do { print "error message\n"; next }; /^\s*([<>])\s*(\S+)/ and do { print "separated '$1' from '$2'\n"; ne +xt }; /^\s*\|/ and do { print "pipefront\n"; next }; /\|\s*$/ and do { print "pipeend\n"; next }; print "\n"; } __END__ working with >test.txt... separated '>' from 'test.txt' working with <test.txt... separated '<' from 'test.txt' working with >>test.txt... error message working with | test... pipefront working with test |... pipeend
This probably needs more refinement but I think I'll leave that to you ;).
Update: Code beautification.
--
David Serrano
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: searching the strings
by blazar (Canon) on May 10, 2006 at 13:21 UTC | |
by Hue-Bond (Priest) on May 10, 2006 at 13:39 UTC | |
by ikegami (Patriarch) on May 10, 2006 at 16:18 UTC | |
by blazar (Canon) on May 11, 2006 at 08:34 UTC | |
by ikegami (Patriarch) on May 11, 2006 at 14:28 UTC |