Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: (jeffa) Re: Question about using hash indexes with GD::Graph

by extremely (Priest)
on Mar 21, 2001 at 02:43 UTC ( [id://65870]=note: print w/replies, xml ) Need Help??


in reply to (jeffa) Re: Question about using hash indexes with GD::Graph
in thread Question about using hash indexes with GD::Graph

merlyn showed ya map but honestly you shouldn't get into the habit of traipsing through a data set multiple times. When ever you see two lines that both end "foreach (@array)" you should be doing:
foreach (@data) { push @h, $_->{'hour'}; push @c, $_->{'count'); }

You get in a hurry and do it wrong then wind up going through the same data like 7 or 8 times when there are 100,000 items in the list and you are going start wondering where your afternoon of surfing PM went. =P

--
$you = new YOU;
honk() if $you->love(perl)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-13 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found