Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: writing files while reading files

by perigeeV (Hermit)
on Jul 21, 2002 at 02:03 UTC ( #183719=note: print w/replies, xml ) Need Help??


in reply to writing files while reading files

open(READER, "file1") || die "$!"; open(WRITER, "+<file2") || die "$!"; while(<READER>) { chomp; munge($_); mutilate($_); print WRITER "$_\n"; # Note the filehandle argument to print. }


Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://183719]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2022-11-28 19:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?