in reply to Re: Re: passing subroutine arguments directly into a hash
in thread passing subroutine arguments directly into a hash
Another "a-ha!" moment is just one more step away. The '=>' operator is really just a glorified comma. It will quote simple barewords on the LHS, but thats the only difference. Consider the following:
So, the somewhat unfamiliar:my @a = (1 => 2 => 3 => 4); print "$_\n" for @a;
is really just a very familiar four element list:(arg1=>$blah, arg2=>$blah2)
dressed up with some syntactic sugar. (note the need to quote 'barewords' when using commas)( 'arg1' , $blah , 'arg2' , $blah2 )
With this in mind, take another look at your hash assignment and named argument passing.....
-Blake
|
|---|