in reply to Re^4: awk like question in perl
in thread awk like question in perl

The problem is that you've opened the filehandle FOO for output, but then you try to read from it with the <FOO> operator. You can't do that. Opening the file for output is going to clobber whatever its contents were, and you can't read from a file opened with ">".

See perlopentut and perlopen for details.


Dave