On Saturday, June 15, 2002, at 09:27 , Paul Johnson wrote:
> On Sat, Jun 15, 2002 at 06:10:23PM +0200, Robert Kasunic wrote: >> Hello, [..] >> sub test_params() >> { >> @ARGV=@_; > > local @ARGV = split " ", shift; > >> print "ARGV: @ARGV\n"; .... >> } >> >> &test_params("-a argument_a -b -c"); >> &test_params("--opta argument_a -b -c"); >> &test_params("-b"); >> &test_params("-c -b"); OOOOH! My complements.... The problem is not really with the Getopt::Long, but with the need to be more sensitive to a) perldoc perlsub - cf the prototyping problem here - note the warning if the "&" is removed b) perldoc perldata and perldoc -f split since what is being passed is a string, and should be converted by any means neccesary into an array GOOD use of the 'local' since we are dealing with a 'reserved token'.... cf: http://www.wetware.com/drieux/pbl/bloopers/BadParamPassing.txt ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]