http://www.perlmonks.org?node_id=160245

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.
A reply falls below the community's threshold of quality. You may see it by logging in.