go ahead... be a heretic | |
PerlMonks |
Re^2: can split() use a regex?by davidrw (Prior) |
on Jun 17, 2006 at 16:02 UTC ( [id://555989]=note: print w/replies, xml ) | Need Help?? |
or use (and IMHO better because it clearly designates it as a regex to the reader) the normal //:
BUT.. you need the delimeter as $one .. so need to capture it: BUT .. that will have the space in $one .. so use a look-behind (see perlre) instead .. (and add the LIMIT) so to OP -- yes, it's possible w/split & regex ;)
In Section
Seekers of Perl Wisdom
|
|