Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Just another Perl shrine
 
PerlMonks  

Re: Running perl functions from a command line

by hardburn (Abbot)
on Jan 28, 2003 at 14:55 UTC ( #230600=note: print w/ replies, xml ) Need Help??


in reply to Running perl functions from a command line

You need to parse the command line options (see Getopt::Long) and then run the functions based on that. For instance:

use strict; use Getopt::Long; my $a_opt; my $options = GetOptions('a' => $a_opt); if($a_opt) { Foo1(); Foo2(); Foo3(); } # Rest of program here


Comment on Re: Running perl functions from a command line
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2014-04-21 08:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (492 votes), past polls