in reply to Re: anonymous filehandle for overridden open sub
in thread anonymous filehandle for overridden open sub

I get no output when I run this:

use strict; sub open { my $filehandle = shift; return CORE::open($filehandle,@_[0..$#_]); } my $file = $0; my $AFILE; if (main::open ($AFILE, '<', $file)) { print while <$AFILE>; } else { warn 'Failed'; }
(I do get output if the condition in the if statement is
main::open($AFILE = IO::File->new(), "<$file")
)

the lowliest monk