@ARGV[0] will open the word.txt file
@ARGV is the array that contains the command-line arguments intended for the script.
In Perl Programming, to get the first element of an array(such as @ARGV), you use $ARGV[0], not @ARGV[0].
Please note the usage of "$" and "@".
Please also check What is the difference between $array[1] and @array[1]?
In reply to Re: read file from ARGV
by 2teez
in thread read file from ARGV
by starface245
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |