P is for Practical | |
PerlMonks |
Re: Surprised by splitby davorg (Chancellor) |
on Aug 11, 2005 at 10:06 UTC ( [id://482889]=note: print w/replies, xml ) | Need Help?? |
The '\' has a special meaning in a double-quoted string. And _also_ a special meaning in a regex. You'll need two of them in order to break through both special meanings. But the first argument to "split" should be a regex. So don't pass it a string :) See... now I'm wondering about split qr(\|) and split m/\|/.
-- <http://dave.org.uk> "The first rule of Perl club is you do not talk about
Perl club."
In Section
Seekers of Perl Wisdom
|
|