in reply to Override "null filehandle"
> Here's how it works: the first time <> is evaluated, the @ARGV array is checked, and if it is empty, $ARGV[0] is set to "-", which when opened gives you standard input.
So what's happening is that STDIN is re-opened.
Did you try @ARGV = ($INPUT); instead?
just tested, doesn't work, this will try to use $INPUT as filename not handle...
From the proposed alternatives, I like choroba's best with *ARGV = \$INPUT
Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery
|
|---|