in reply to (ar0n) Re: Filehandles and Arrays
in thread Filehandles and Arrays

Technically though, you've also messed up ARGV and $ARGV. The safest would be:
my @array = do { local *ARGV; @ARGV = "foo.txt"; <> };

-- Randal L. Schwartz, Perl hacker