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

    Join Date
    Jan 2000
    Rep Power
    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.

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

    Join Date
    Jul 1999
    Rep Power
    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