![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^4: perl -i -pe ... with eof() testingby Anonyrnous Monk (Hermit) |
on Feb 08, 2011 at 20:38 UTC ( [id://887046]=note: print w/replies, xml ) | Need Help?? |
Thanks, you're right. Just for the record: I had confused myself unnecessarily by not putting a separator in between the cat of file1 and file2. Which made me wonder why the magical file handle is only being advanced by eof() at the very end, and not at every file boundary. When you do it properly, however, i.e. something like
the output is
which shows that line3 of the first file does in fact belong to file2 after the processing... P.S. I've now settled on suggesting my collegue
(but unfortunately it took a little too long to get working to leave an "it's easy with Perl" impression — that's my fault, however :)
In Section
Seekers of Perl Wisdom
|
|