more useful options | |
PerlMonks |
Look behind and globalby gingaloon (Acolyte) |
on Mar 14, 2005 at 11:40 UTC ( [id://439231]=perlquestion: print w/replies, xml ) | Need Help?? |
gingaloon has asked for the wisdom of the Perl Monks concerning the following question:
Dear All,
I wish to insert a new line every two digits. Thought I'd use look-behind to do this:
I get: 12 3 4 5I know I can do this other ways, but the result has left me confused as to what is going on with the look behind with the global modifier. Surely at position 3 the look behind 'sees' 12\n? No? Any explanation would be appreciated many thanks james
Back to
Seekers of Perl Wisdom
|
|