in reply to Re^2: Ordering objects using external index
in thread Ordering objects using external index
That makes it look like your using symbolic references? Ie. Variable names that are (partially) made up from other variable names. eg.
$uid = 5674; ${'msg' . $uid } = ...;
In which case, you should be making that a hash directly:
push @uid, 5674; $msgs{ $uid[ -1 ] } = ...;
then you wouldn't be having the mapping problem later on. Producing your ordered array would then become a simple hash slice:
@ordered = @msgs{ @uid };
It's difficult to know without seeing how the variables and data in your snippets are beiing created.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Ordering objects using external index
by kappa (Chaplain) on Sep 07, 2004 at 11:14 UTC |