Changes

File I/O in Perl

284 bytes added, 16:01, 12 April 2008
/* Open a file to WRITE */
The following lines were added (+) and removed (-):
Read from one file and write its contents into another file. my $infile = 'bobsbills.txt'; my $outfile = 'bobsexpenses.txt'; open IN, "< $infile" or die "Can't open $infile : $!"; open OUT, "> $outfile" or die "Can't open $outfile : $!"; print OUT <IN>; close IN; close OUT;
Bureaucrat, administrator
16,192
edits