Hi Bastian,

Bastian Angerstein wrote on 24.05.2004:

>I tought:
>$index = 1
>
>$var = ${$myhash{mykey}}[$index];
>
>would do the trick.
>
>But it donīt.
>
>
>Any suggestions?
>
>
Your syntax implies that there already is an anonymous array stored as value of 
$myhash{mykey}. You assign the second value within that array to $var. In this case, a 
more readable version could utilize arrow dereferencing:

$var = $myhash{mykey}->[$index];

But what you are trying to do (according to youzr subject line) is

$myhash{mykey}->[$index] = $var;

Or did I get you wrong?

- Jan
-- 
Hanlon's Razor: Never attribute to malice that which can be adequately explained by 
stupidity.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to