in reply to Re: hash array removal ?
in thread hash array removal ?

I think $hash->{'TRAPS'} is an array ref, so the above code won't work. I think broquaint had it right, by doing:

my $position = 1; splice @{$hash->{'TRAPS'}->{'TRAP_LIST'}}, $position, 1;

Replies are listed 'Best First'.
Re: Re: Re: hash array removal ?
by chromatic (Archbishop) on Feb 25, 2003 at 17:04 UTC

    Unless Zaxo modified his code without telling anyone, they're effectively the same thing. Second and subsequent dereferencing arrows are optional.

      Cool.. I learned something new. Is this why everybody's downmodding me? I was only trying to help....
Re: Re: Re: hash array removal ?
by Anonymous Monk on Feb 25, 2003 at 16:02 UTC
    I think $hash->{'TRAPS'} is an array ref
    ...Yes it is