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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running a script and passing a parameter

Status
Not open for further replies.

sloppyhack

Technical User
Apr 17, 2001
111
US
We have a db stored procedure calling a Perl process and passing a parameter...the script is to take the parameter...process it..and return a parameter to the database. I'm not sure how to accept and pass back. It should be just as you would run a script and pass a parameter via the command line. Example...

C:\>script.pl (parameter)

How do you run a script and pass a paramenter in the same command? That should solve our problem.

Cheers,

Sloppyhack
 
Nevermind. It's the "shift" function. "Shift" reads the parameter and passes it to the variable. Done.


Cheers,

Sloppyhack
 
@ARGV is the array you're shifting just for future reference
--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top