RE: deleting hash values

2001-02-21 Thread Matthew Thompson
Thanks for the advice guys, both are things that will help matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 10:54 AM To: Matthew Thompson Cc: activeperl Subject: deleting hash values Matthew Thompson writes: > Hi, &g

deleting hash values

2001-02-21 Thread brianr
Matthew Thompson writes: > Hi, > I'm using the following code to delete values from a hash - I get the > warning (I say warning as it does delete the value) below when delete is > called. Is ther a better way of deleting values from hashes? > > foreach $item (%$self) { >

Re: deleting hash values

2001-02-20 Thread siberian
I would use a sub hash $Users{ User2 }{ Location } = .. ; $Users{ User2 }{ Lastname } = .. ; $Users{ User1 }{ Location } = .. ; Then you can say delete $Users{ $Section } ; and avoid the looping. You also get the added benefit of simpler database management if your fetching / pushing to sql.

deleting hash values

2001-02-20 Thread Matthew Thompson
Hi, I'm using the following code to delete values from a hash - I get the warning (I say warning as it does delete the value) below when delete is called. Is ther a better way of deleting values from hashes? foreach $item (%$self) { if ($item=~/^$section\.(.*)/) {