John Ross wrote:
> Thank you to all of you who responded to my question about pasing hashes
> into a function. The -> operator did the trick.
> My problem was that I thought once I passed the hash in, I could
> dereference it That doesn't appear to work like I expected.
>
> sub mod_hash {
>
Thank you to all of you who responded to my question about pasing hashes
into a function. The -> operator did the trick.
My problem was that I thought once I passed the hash in, I could
dereference it That doesn't appear to work like I expected.
sub mod_hash {
my $hash_ref = @_;
my
On Monday, August 19, 2002, at 03:08 , John Ross wrote:
> I am trying to pass an already existing hash into a subroutine, modify
> that hash, and have the modifications "take" when I leave the subroutine.
> I have looked through a number of perl books, but I either don't know what
> I am looking
John Ross wrote:
>
> I am trying to pass an already existing hash into a subroutine, modify
> that hash, and have the modifications "take" when I leave the subroutine.
> I have looked through a number of perl books, but I either don't know what
> I am looking for, or I just don't understand how t
A code snippet would be very helpful. To pass a hash and update it,
then
func(\%hash);
sub func {
my ( $hash ) = @_;
$hash->{key} = 1;
# this should be reflected back in the calling program when you return
}
Wags ;)
-Original Message-
From: John Ros