Hi All,

 

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?

 

 

Thank you!!!

 

 

my %all = (

          "Gilligan" => [EMAIL PROTECTED],

          "Professor" => [EMAIL PROTECTED],

          "Skipper" => [EMAIL PROTECTED],

          );

          

check_items_for_all(\%all);

 

sub check_items_for_all {

          my $all = shift;

          for my $person (sort keys %$all) {

            check_required_items($person, $all->{$person});

          }

       }

 

 

__END__

 

brian volk

hpproducts.com

[EMAIL PROTECTED]

317-298-9950 x1245

 

Reply via email to