Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Are there argc and argv type functions in perl

by btrott (Parson)
on Mar 10, 2000 at 22:41 UTC ( #5170=note: print w/ replies, xml ) Need Help??


in reply to Are there argc and argv type functions in perl

No such thing as $ARGC, as far as I know.

But yes, you can use @ARGV to get the command line args. Something to be aware of is that

$ARGV[0]
is not the command name; it's the first argument.

Also, check out the Getopt family of modules for automatically parsing your command line args:

perldoc Getopt::Std perldoc Getopt::Long
and more.


Comment on Re: Are there argc and argv type functions in perl
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://5170]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2015-07-30 17:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls