If the number of values isn't too large, you could use an array and use the
index+1 as the associated value. Of course you would have to loop through
the array to find the Apple or Peach entry. Then to remove an entry, you
use the splice function.
Ed Ewen
(404) 575-3531
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
-----Original Message-----
From: Scott K Purcell [SMTP:[EMAIL PROTECTED]]
Sent: Tuesday, May 02, 2000 8:53 AM
To: Perl-Win32-Users Mailing List
Subject: Hash Q
Hello,
I have a hash whose keys are organized by the values.
eg.
%hash = (
'apple' => '1',
'peach' => '2',
'pear' => '3',
'plum' => '4',
);
And all is good.
But now, if I delete an item, lets say 'peach', I need some way to
move the
values up and keep the order, just minus the one.
eg.
apple = 1;
pear = 2;
plum = 3;
I haven't came up with any creative ways yet. Does anyone have any
ideas?
PS, it also needs to be a pretty solid solution.
Thanks
Scott
---
You are currently subscribed to perl-win32-users as:
[EMAIL PROTECTED]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]