Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Help with better complex hash processing

by YuckFoo (Abbot)
on Sep 27, 2006 at 18:46 UTC ( #575220=note: print w/replies, xml ) Need Help??


in reply to Help with better complex hash processing

If you just wanna get rid of the long series of dereferences that tend to uglify the code and cause much typing, save each step of dereference inside each loop.

YuckFoo

for my $nkey (keys %$exception_report) { my $node = $exception_report->{$nkey}; print "Exceptions for $nkey:\n\n"; for my $ekey (keys %$node) { my $exception = $node->{$ekey}; for my $fkey (keys %$exception) { my $file = $exception->{$fkey}; while ( my ($metric, $value) = each %$file) { print "\t$ekey : ($fkey) $metric = $value\n"; } } } }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://575220]
help
Chatterbox?
[Corion]: Yay. I've now published (at $work) that random Excel workbook where on one sheet you enter your SQL and on the other sheet, you have a button and receive the results. I'm so evil in enabling cow-orkers to self-supply ;)
[Corion]: It's close to my Perl script where you paste in the SQL and get the result as XLSX file, but I guess the Excel sheet is more user-friendly :)
[choroba]: What drivers does it support? ;-)
[erix]: sounds cool -- but now you have to give SQL lessons?

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2018-07-18 13:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (392 votes). Check out past polls.

    Notices?