- or download this
% perl -Mautodie /tmp/buggy
Name "main::OUTPUT_FILE" used only once: possible typo at /tmp/buggy l
+ine 16.
Can't close filehandle 'OUTPUT_FH': 'Bad file descriptor' at /tmp/bugg
+y line 19
- or download this
use vars qw($fh);
undef $fh;
...
print $fh "I am so NOT a lexical filehandle.\n";
close($fh)
|| die "can't close /tmp/data.$$: $!";
- or download this
my $fh = *STDOUT;
print $fh "I am SO TOO lexical filehandle.\n";