use strict; use warnings; open my $fh,'>','foo' or die $!; print $fh 'foo'; close $fh or die $!; symlink 'foo','bar'; # ln -s foo bar BEGIN { *::_ = sub { return \*_ unless @_; }; } { no warnings; print lstat 'bar' && -l _; # '' (incorrect) print "\n"; } print lstat 'bar' && -l _; # Use of -l on filehandle _ print "\n"; local *_; print lstat 'bar' && -l _; # Undefined subroutine &main::_ print "\n";