Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

It's dumb but I need an answer

by Anonymous Monk
on Apr 18, 2002 at 16:09 UTC ( #160245=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Is it possible to pass variable values to a perl program directly from the DOS command line? I'm thinking of a notation like this: c:\>perl myscript 10 where 10 is the value that my script wants to use. Please help. Thanks.

Replies are listed 'Best First'.
Re: It's dumb but I need an answer
by bmcatt (Friar) on Apr 18, 2002 at 16:15 UTC
    Repeat after me: @ARGV is my friend...
      Thanks for solving my problem! Now I can get on with my life.
Re: It's dumb but I need an answer
by pepik_knize (Scribe) on Apr 18, 2002 at 16:25 UTC
    perldoc perlvar, look for @ARGV
      Thanks for solving my problem! I've been scanning through books about it, going nuts.
Re: It's dumb but I need an answer
by BUU (Prior) on Apr 18, 2002 at 16:11 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://160245]
Approved by lemming
help
Chatterbox?
[robby_dobby]: Likewise! I haven't seen a lot of people with HAs back where I come from, so I figured it might be the same around here too...
[robby_dobby]: Oh, shit -- I was replying to someone, but it wound up here. -_-
robby_dobby is still not used to PM's interface. /o\
[oiskuu]: War. War never changes.
[robby_dobby]: "My cat is a very good mouser" -- that's a great way to identify a Brit among a crowd :-)

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (14)
As of 2017-11-17 19:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (272 votes). Check out past polls.

    Notices?