Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: get array from getoptions

by ctilmes (Vicar)
on Aug 19, 2008 at 16:46 UTC ( #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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://705261]
Discipulus what? Can I approve one of post on my own? weird..
Discipulus my posts..
[choroba]: It's been reported before
[Discipulus]: ok no big deal anyway..
[Discipulus]: mmh choroba.. my post is not for you, if you do not want your golfing game somehow spoilered for one of the problems. Adviced! ;=)
[Discipulus]: no that i aim to victory anyway..

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2017-10-22 19:40 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (275 votes). Check out past polls.