I may ask a stupid question, but why the $ARGV[0] in while loop cannot be accessed?
I thought @ARGV is global variable and should be accessed anywhere, of course from within of while loop.
did I miss something?
print $ARGV[0],"\n"; #printed while(<>){ print "$ARGV[0]\n"; #cannot be printed }
In reply to @ARGV in while loop by lightoverhead
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |