Amphiaraus has asked for the wisdom of the Perl Monks concerning the following question:
Can @ARGV work within Perl functions or is it just for script input?
argument_size is 0
Even though 4 arguments were given to function verify_function_params
My output is showing --sub copymerge_functions_pm_init { my $input = $_[0]; my $type = $_[1]; &verify_function_params(2, "copymerge_functions_pm_init", $input, $ +type); <-- 4 arguments sub verify_function_params { my $num = $_[0]; my $function_name = $_[1]; my $input = $_[2]; my $type = $_[3]; my $argument_size = scalar(@ARGV); print "argument_size is $argument_size\n";
argument_size is 0
Even though 4 arguments were given to function verify_function_params
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Can @ARGV work within Perl functions or is it just for script input?
by MidLifeXis (Monsignor) on Feb 09, 2009 at 19:13 UTC | |
Re: Can @ARGV work within Perl functions or is it just for script input?
by Bloodnok (Vicar) on Feb 09, 2009 at 19:37 UTC | |
by jdporter (Chancellor) on Feb 09, 2009 at 20:30 UTC | |
by jasonk (Parson) on Feb 10, 2009 at 16:46 UTC | |
by johngg (Canon) on Feb 09, 2009 at 20:39 UTC | |
Re: Can @ARGV work within Perl functions or is it just for script input?
by Anonymous Monk on Feb 09, 2009 at 19:34 UTC | |
Re: Can @ARGV work within Perl functions or is it just for script input?
by Amphiaraus (Beadle) on Feb 09, 2009 at 23:32 UTC |
Back to
Seekers of Perl Wisdom