Are you sure you want to exit your program if one of the files can't be opened? I might have written it something like this:
for my $file (@filenames) { open IN,$file or warn("unable to open $file - $!\n"), next; print OUT <IN>; close IN; }
You'll also notice that I didn't quote the filename. No need for that
In reply to Re: Replicate file
by duff
in thread Replicate file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |