On Fri, Apr 14, 2006 at 12:18:33PM -0400, Brian Volk wrote:
> 
> I'm working through the exercises in the Alpaca book.  I don't
> understand why you have to pass the check_items_for_all subroutine a
> reference to a hash.  Why can't you just pass it the hash itself...
> check_items_for_all(%all) instead for (\%all) ?  Could someone pls
> explain this to me?

Subroutines take arguments in scalar context.  As far as I can tell, it
was a design decision.

-- 
Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ]
"The first rule of magic is simple. Don't waste your time waving your
hands and hopping when a rock or a club will do." - McCloctnick the Lucid

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to