in reply to Getting error when trying to compare two files
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.
|
|---|