Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: get array from getoptions

by ctilmes (Vicar)
on Aug 19, 2008 at 16:46 UTC ( [id://705261]=note: print w/replies, xml ) Need Help??


in reply to get array from getoptions

First:, add "use strict; use warnings;" to the top.

Getopt::Long doesn't handle something like "-f test_1 test_2". It will handle "-f test_1 -f test_2" or "-f test_1,test_2" (you do the split), or even "-f 'test_1 test_2'" (again, split after you get the args).

Alternately, you can have it treat -f as a boolean, then grab the filenames test_1 and test_2 from @ARGV after Getopt::Long has done its thing.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-28 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found