Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Trouble with array of arrays

by Loops (Curate)
on Nov 17, 2014 at 14:17 UTC ( #1107414=note: print w/replies, xml ) Need Help??


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] }; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1107414]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2021-04-11 19:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?