#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    2
    Rep Power
    0
    This may seem elementary, but how do you pass command line variables to a perl script? I've tried to look and search on it to no avail. If someone could point me in the right direction, it would help a lot. (I assume it is possible, right?) Thanks.

    Darryl
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 1999
    Posts
    33
    Rep Power
    15
    say you run your perl script with:

    perl script.pl or ./script.pl you can then put your arguments after that.

    ie: perl script.pl name test okay

    in perl you'd reference those with $ARGV[0] through to $ARGV[2]. $ARGV[0] would = name. Some cases you may need to put speach marks around your arguments.

IMN logo majestic logo threadwatch logo seochat tools logo