Still you should be able to handle it. Study the output:
use strict;
my(%hash) = ('name1'=>['Joe','Doe'],
'name2'=>['Ahmed', 'Basha']);
while(my($key,$val) = each %hash){
print ("$key ==> @$val\n");
}
delete(${$hash{'name2'}}[0]);
while(my($key,$val) = each %hash){
print ("$key ==> @$val\n");
}
--Rex
> -----Original Message-----
> From: Ahmed Moustafa Ibrahim Ahmed [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 20, 2001 3:54 PM
> To: Daniel Gardner
> Cc: [EMAIL PROTECTED]
> Subject: Re: How to delete hash element
>
>
> The value of each key is an array. And, I want to delete an
> element of this array. I don't want to delete the whole key.
> Is it possible?
> ----- Original Message -----
> From: Daniel Gardner
> To: Ahmed Moustafa Ibrahim Ahmed
> Cc: [EMAIL PROTECTED]
> Sent: Tuesday, November 20, 2001 12:50 PM
> Subject: Re: How to delete hash element
>
>
> Tuesday, November 20, 2001, 8:41:03 PM, Ahmed Moustafa
> Ibrahim Ahmed wrote:
>
> AMIA> If I know the key and offset of the element, how can
> I delete that hash
> AMIA> element, please?
>
> you can delete a hash element like:
>
> delete $hash{ the_key };
>
> but i'm not sure what you mean by "the offset of the element"
>
>
> --
> Best regards,
> Daniel mailto:[EMAIL PROTECTED]
>
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]