more useful options | |
PerlMonks |
Re: Getting characters from regex patternby starbolin (Hermit) |
on Jun 25, 2008 at 06:51 UTC ( [id://693895]=note: print w/replies, xml ) | Need Help?? |
This does the transformation you asked for but I'm not sure it meets your readability requirement. Certainly not the way I'd parse tokens out of a string.
s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}
In Section
Seekers of Perl Wisdom
|
|