"be consistent" | |
PerlMonks |
Re: Write contents of a file, whilst reading from another fileby dga (Hermit) |
on Apr 01, 2003 at 16:00 UTC ( [id://247269]=note: print w/replies, xml ) | Need Help?? |
One way is to open 2 filehandles thus:
This will copy file.to.read into file.to.write unchanged. If you do stuff in the while where the comment is before writing then print the variable you want into the new file you have a filter.
In Section
Seekers of Perl Wisdom
|
|