Kyle Burton on Thu, 9 Dec 1999 10:39:24 -0500 (EST) |
Use delete(): my %h = ('a'=>1,'b'=>2,'c'=>3); delete $h{'a'}; # 'a'=>1 is now gone from the hashtable... k ------------------------------------------------------------------------------ "It is always the best policy to tell the truth, unless, of course, you are an exceptionally good liar." -- Jerome K. Jerome mortis@voicenet.com http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ On Thu, 9 Dec 1999, Charles Stack wrote: > If one has a hash that has, say N elements in it and you want to get rid of > some, how does one do that? With perl arrays, one can use $#. I haven't > figured out how to do it with hashes without making a new hash table. > > Charles > > > BTW, has anybody downloaded JBuilder Foundation from Inprise yet? > > > _______________________________________________ > Plug maillist - Plug@lists.nothinbut.net > http://lists.nothinbut.net/mail/listinfo/plug > _______________________________________________ Plug maillist - Plug@lists.nothinbut.net http://lists.nothinbut.net/mail/listinfo/plug
|
|