my $file = 'file.txt'; open my $wfh, '+>', $file or die "Couldn't open file $file: $!"; print $wfh join "\n", @output; close $wfh;
Don't use barename file handles. They are global, and they're unfriendly for a few reasons. Put your handle into a variable.
In reply to Re: Getting error when trying to compare two files
by stevieb
in thread Getting error when trying to compare two files
by adalamre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |