With the following line, you overwrite all contents of %hash:
%hash=@$row;
Most likely, you only wanted to add a single key/value pair to the hash?
my( $key, $value ) = @$row; $hash{ $key } = $value;
In reply to Re: Not able to retrieve hash value outside the function
by Corion
in thread Not able to retrieve hash value outside the function
by aniammu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |