more useful options | |
PerlMonks |
Re^3: Adding back missing newlines between recordsby johngg (Canon) |
on Nov 06, 2009 at 11:29 UTC ( [id://805454]=note: print w/replies, xml ) | Need Help?? |
I don't see how that is supposed to work. It's supposed to work because, as ikegami pointed out, you use the -0777 switch to make the interpreter slurp the whole file in one go, the equivalent of undefining $/ in a script. Thus, the global replace operates on a single string which is the whole file and the while implied by -p only iterates once.
I hope this is helpful. Cheers, JohnGG
In Section
Seekers of Perl Wisdom
|
|