Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Perl script parameters

by kennethk (Abbot)
on Oct 16, 2012 at 14:50 UTC ( #999347=note: print w/ replies, xml ) Need Help??


in reply to Perl script parameters

When I need to pass parameters, I use the CORE module Getopt::Long. The docs are pretty complete, and include type checking on input.

Re: Log file, you could either feed it in on STDIN or pass the file name as a parameter and explicitly open (open my $fh, '<', $log or die "Open fail: $!";) and read (my @Build_Log_Array = <$fh>;) it. Both work, and which I use depends on the particulars of my need.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.


Comment on Re: Perl script parameters
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://999347]
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: (13)
As of 2015-07-31 16:29 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 (279 votes), past polls