Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^5: Combine data in table

by davidrw (Prior)
on Aug 08, 2005 at 01:19 UTC ( [id://481760]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Combine data in table
in thread Combine data in table

here's three different ways.. note that the second two make it trivial to output in a sorted manner (something like sort keys %ips instead of just keys %ips):
while( my ($ip, $h) = each %ips ){ printf "%s,%d,%d\n", $ip, $h->{colPartitionSize}, $h->{colPartitionF +ree}; } foreach my $ip ( keys %ips ){ my $h = $ips{$ip}; printf "%s,%d,%d\n", $ip, $h->{colPartitionSize}, $h->{colPartitionF +ree}; } printf "%s,%d,%d\n", $_, $ips{$_}->{colPartitionSize}, $ips{$_}->{colP +artitionFree} for keys %ips;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-26 01:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found