I guess your main problem is that you're not reading the INPUT file mentioned in $ARGV[0]. You're reading from STDIN.
Update: davorg is correct. Anyway, s/he's not reading the file s/he thinks s/he reads.
In reply to Re: confused
by Biker
in thread @ARGV / Command Line Arguments
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |