Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: using wildcard character * in perlscript command line

by blazar (Canon)
on Jan 29, 2005 at 08:34 UTC ( #426207=note: print w/ replies, xml ) Need Help??


in reply to Re: using wildcard character * in perlscript command line
in thread using wildcard character * in perlscript command line

foreach my $arg (@ARGV) { foreach (glob $arg) { print; } }
(Nah!) Since wildcard expansion "should" happen before the args are passed to the script, I like to do it all at once as early as possible:
BEGIN {@ARGV=map glob, @ARGV}
And then the rest of code can plainly ignore what happened with no need of ad hoc interventions...


Comment on Re^2: using wildcard character * in perlscript command line
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2015-07-31 00:11 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 (274 votes), past polls