I think u have to shift the scalar first, and then shift the entire remaining content into the hash;
sub db_modify_account { my $a = shift; my %new_data=@_; while (($key, $value) = each %new_data) { print "The $key is: $value.<BR>"; } }
or else U can use passing by references.
see perldoc for perlreftut.
In reply to Re: Passing a hash, and a scalar to subroutine
by murugu
in thread Passing a hash, and a scalar to subroutine
by gorillaman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |