dragonchild has asked for the wisdom of the Perl Monks concerning the following question:
The problem I'm having is summarized as so:
The cache is a parallel array of records, each index corresponding to an iterator in @iterators. So, I could do something like:
RECORD: for my $record (@merged_records) { my $index; for $index (0 .. $#cache) { if ($cache[$index] eq $record) { $cache[$index] = 0; next RECORD; } } die "Cannot find record to remove in cache!\n"; }
But, that depends on stringifying the references, and I'm not comfortable with that. Plus, the iterators might not be returning references, so this would fail.
Help!
------
We are the carpenters and bricklayers of the Information Age.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sorting for indices and client-defined routines
by Roger (Parson) on Mar 03, 2004 at 23:02 UTC |