in reply to $ARGV[0] meaning

$argv[0] is the first argument passed to the program

eg.

perl script.pl "location_filetoopen"

Replies are listed 'Best First'.
Re^2: $ARGV[0] meaning
by Anonymous Monk on Nov 14, 2017 at 13:02 UTC
    thanks for stating this clearly enough for a newb to get

      Except it's wrong. :P s/argv/ARGV/;

      moo@cow~>perl -le 'print $argv[0] || "NONE 4 U"' OHAI NONE 4 U moo@cow~>perl -le 'print $ARGV[0] || "NONE 4 U"' OHAI OHAI