Re: Passing Hash to Subroutine..

2001-05-23 Thread Robert McFrazier
hash... hope this helps.. Robert McFrazier - Original Message - From: "Gray, Josh" <[EMAIL PROTECTED]> To: "Perl-WEB" <[EMAIL PROTECTED]> Sent: Tuesday, May 22, 2001 10:48 AM Subject: Passing Hash to Subroutine.. > I found this snip in "Advance

Re: Passing Hash to Subroutine..

2001-05-22 Thread Ron Grabowski
> @array1 = (1, 2, 3); @array2 = (4, 5, 6, 7); > AddArrays (\@array1, \@array2); # Passing the arrays by reference. AddHash( \%hash ); # named hash AddHash( { hello => world } ); # anonymous hash sub AddHash { my($hash_ref) = @_; print keys %$hash_ref; } _

Passing Hash to Subroutine..

2001-05-22 Thread Gray, Josh
I found this snip in "Advanced Perl Programming" but how do you this same thing for hashes, i can't figure it out.. @array1 = (1, 2, 3); @array2 = (4, 5, 6, 7); AddArrays (\@array1, \@array2); # Passing the arrays by reference. print "@array1 \n"; sub AddArrays { my ($rarray1, $rarr