Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Problem splitting a string that contains ^Iby belg4mit (Prior) |
on Apr 21, 2002 at 21:38 UTC ( [id://160933]=note: print w/replies, xml ) | Need Help?? |
UPDATE: Doh! See dws's reply above. Damn sans-serif font...
Examining the split documentation very closely we see that the first argument is in fact a regular expression. So you are trying to match a pipe at the beginning of the line. You need to escape your sequence. This could easily have been found by RTFM, and perhaps by a search BUT, it is something that even experienced people get nicked by. Enjoy.
--
In Section
Seekers of Perl Wisdom
|
|