M
mike
hi
i have something like this
%names = (1=>['TEST','12345','testuser'],
2=>['TEST USER','12345','testuser1']);
do_something(%names,'ABC');
sub do_something {
my (%hash,$abc) = @_;
print "abc = $abc";
while ( my ($keys,$val) = each(%hash) )
{
print "key = $keys, value = $val\n";
}
}
i got the output
abc =
key = ABC, value =
key = 1, value = ARRAY(0x1abeff4)
key = 2, value = ARRAY(0x1abf0fc)
why does 'ABC' become a key inside the hash?? I think there's someting
wrong with passing the @_.
thanks for any help
i have something like this
%names = (1=>['TEST','12345','testuser'],
2=>['TEST USER','12345','testuser1']);
do_something(%names,'ABC');
sub do_something {
my (%hash,$abc) = @_;
print "abc = $abc";
while ( my ($keys,$val) = each(%hash) )
{
print "key = $keys, value = $val\n";
}
}
i got the output
abc =
key = ABC, value =
key = 1, value = ARRAY(0x1abeff4)
key = 2, value = ARRAY(0x1abf0fc)
why does 'ABC' become a key inside the hash?? I think there's someting
wrong with passing the @_.
thanks for any help