PERL and Anonymous Hashes and Debugging
PERL has a seemingly infinite number of libraries out there. One that I find extremely helpful and which I just happened to stumble upon is the Data::Dumper one. For anyone that has used Perl references and anonymous hashes, you know how tough debugging can be. But Data::Dumper is so cool. Just use the library and then print the main reference to see the whole tree: #!/usr/bin/perl use Data::Dumper; use warnings; use diagnostics; use strict; my ($nextline,$HOST,$COMPONENT,$RESTOFLINE,$PHASE,$INTERVAL,$FLOWS,$OVERFLOW); my ($masterHash); $masterHash = {}; while ( defined($nextline= ) ) { chomp ($nextline); if ( $nextline =~ m/^[A-Za-z]+\s+\d+\s+\d+:\d+:\d+\s+([A-Za-z0-9_]+)\s+\[\d+\]\s+([A-Za-z0-9_]+):(.*)$/ ) { $HOST = $1; ...