http://qs321.pair.com?node_id=1107414


in reply to Trouble with array of arrays

Sounds like you have a working solution, but there is still a lot of good advice from the monks above to apply. You could also stop unwanted entries from entering the @recordset array in the first place. For instance you can use a hash to keep track of which items have seen their "exit":

my @recordset; my %exit; while ( my @event = fetchrow_array() ) { $exit{ $event[2] } = 1 if $event[1] eq 'exit'; push @recordset, [ @event ] unless $exit{ $event[2] }; }