Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading command line arguments

Status
Not open for further replies.

Loon

Programmer
May 24, 2000
100
GB
Hi,<br><br>&nbsp;&nbsp;&nbsp;I'm trying to use %ARGV to get command line parameters, however there doesn't seem to be anything in $ARGV[0] or $ARGV[1]. I am wondering if the problem is because the script is being called through another script using the system() call.<br><br>&nbsp;&nbsp;&nbsp;How do I get at the command line parameters?<br><br>Cheers<br>Loon<br>
 
Worked it out, using <br><br>$ARGV[0] gives you the first command line parameter.<br><br>I was expecting that to be the script name, as it would in C where argv[0]==program name.<br><br>You live and learn.. :)<br>Loon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top