perl -i~ -p00e0 file1 file2 ...
Wow! I've been over here trying to explain to myself why that works. Help me out a little.
Broken down those switches are:
-i~ -p -00e0
Right?
No problems with the first two here. The third sets the input record separator to 0e0, I think. My 'perlrun' said 00 was a special value used to get "paragraph mode". I'm going to assume 0e0 does the same thing.
Here's where I'm fuzzy though, does "paragraph mode" only leave one \n at the end of $_? I didn't know that. Is it true even if you set if the usual way?
local $/ = '';
One last question, does "paragraph mode" consider lines with only spaces "blank lines" or must it be back-to-back newlines?
Thanks for the lesson!
James
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>