in reply to Getting error when trying to compare two files
DATA is still selected for your print commands, but no longer open. To fix it, insert
my $old_fh = select(STDOUT);
before your line
select DATA;
Then right before or right after your line saying
close DATA;
insert
select($old_fh);
That should make the error go away.
(edit:) Alternatively do not use select but print explicitly to the filehandle instead:
replace this bit of your code
select DATA; print join("\n", @output);
with this bit
print DATA join("\n", @output);
Cheers, Sören
Créateur des bugs mobiles - let loose once, run everywhere.
(hooked on the Perl Programming language)
|
|---|