MadPogo has asked for the wisdom of the Perl Monks concerning the following question:
I am relatively new to Perl so any enlightenment you might provide would be greatly appreciated. MadPogo@header = ('BEGIN','WAFC','AREA_NAME','NODS','R','U','001','040','NONE +','200103231510','NONE','AREA_NAME','END'); if(open(OUTFILE, "> $temp_header") || die("Cannot Open File $temp_head +er for writing")) { foreach $line ( @header ){ print OUTFILE $line."\n"; print "$line \n"; } if(open(OUTFILE2, "< $sample_upload") || die("Cannot Open File $sa +mple_upload for reading")) { while (my $bytesread = read($sample_upload, my $buffer, 1024)) + { print OUTFILE $buffer; } } close (OUTFILE); close (OUTFILE2);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Multiple File Handles
by VSarkiss (Monsignor) on Oct 13, 2001 at 04:35 UTC | |
|
Re: Multiple File Handles
by stefp (Vicar) on Oct 13, 2001 at 04:51 UTC |