Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

File I/O #3

by vroom (His Eminence)
on Nov 19, 1999 at 02:16 UTC ( [id://1011]=note: print w/replies, xml ) Need Help??


in reply to File Input and Output Exercises

# takes two command line arguments for the source and # destination files, respectively. Then copies the contents # from the source file to the destination file. my $source = $ARGV[0]; my $dest = $ARGV[1]; unless ( $source and $dest ) { print "Source or destination file name missing\n"; } open SOURCE, "< $source" or die "error reading $source - $!"; open DEST, "> $dest" or die "error writing $dest - $!"; while ( <SOURCE> ) { print DEST $_; } close SOURCE; close DEST;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found