Using Getopt::Long, how can i pass a value that is a
list into an scalar or array?

In the following example, I would like 'tic tac toe'
to be assigned to a scalar or array variable.

./perlscript.pl --arg1 foo --arg2 tic tac toe

GetOptions( "arg1:s" => \$arg1, "arg2:s" => \$arg2);
# $arg1 now contains "foo" (OK)
# $arg2 now contains "tic" (Not OK)

I would like $arg2, or possibly @arg2, to contain
'tic', 'tac', and 'toe'.

Using quotes around the list works, but I would like
to find a solution that doesn't use quotes if
possible.

thanks,
sal

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to