Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Running perl functions from a command line

by MZSanford (Curate)
on Jan 28, 2003 at 14:52 UTC ( #230598=note: print w/replies, xml ) Need Help??

in reply to Running perl functions from a command line

If you are looking for something to run specific function based on program arguments, like -foo1, you may want to look at the Getopt:: namespace (I like Getopt::Long, but Getopt::Std works for single switches) for argument processing.

Once you have one of the Getopt:: modules working, whichever one, you may want to look at pl2bat (some info here) for making a bat file out of your perl code.

from the frivolous to the serious

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://230598]
[ovedpo15]: can't I use just use lib $FindBin::Bin/../ bin" asuming that p2 is in ./bin and p1 is in /config? it says "cant find" altought p2 is
[moritz]: ovedpo15 "use lib" is only for .pm files
[moritz]: if you don't have .pm file, you might to use "require" or "do" with an absolute path

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2018-03-17 20:45 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (226 votes). Check out past polls.