A cleaner way to do it is use shift to grab the first parameter off the command line:
f (@ARGV) { open FILE, shift or die "No such dictionary..."; rand($.) < 1 && ($answer = (split(/[\r\n]+/,$_))[0]) while <FI +LE>; close FILE;
In reply to Re: Using <> in the presence of @ARGV
by GrandFather
in thread Using <> in the presence of @ARGV
by eibwen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |