use strict; use warnings; my %list=("bob" =>123, "tom" => "CAT"); #Assign values change (%list); sub change{ my %A = shift @_; #Get Values foreach (keys %A){ print "$_ = $A{$_}\n"; \$A{$_} .= "hello"; #Change Values } } foreach (keys %list){ print "$_ = $list{$_}";#Print New Values }
This code doesnt work.
Thanks"Odd number of elements in hash assignment at C:\Documents and Setting +s\Jason\My Documents\perltest\Perl-1.pl line 8."
In reply to referances of hashes, and subroutines by tempest
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |