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
In reply to Re^5: awk like question in perl
by davido
in thread awk like question in perl
by drock
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |