|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Command line variables |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|