"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Some untested thoughts: open (...); Return status of open statements not checked; alternately, use autodie; not used. $devices{$1}=0 if /^\s*(\d{8}$/; Capture group (\d{8}$ not closed. my $imeitag=$1 if /^\s*(\d{8}\d+\s*$/ Capture group (\d{8}\d+\s*$ not closed; statement not terminated (missing semicolon); my $imeitag ... if ... ; conditional creation of lexical (pre-state static variable hack). for my $imeitag (sort {$devices{$a}<=>$devices{$b}} keys %devices){ Sorts keys of hash in ascending numerical order, but then prints first 100 keys, which does not seem in accord with requirement to "output ... the top 100 devices" (whatever "top" may exactly mean in the context of the OP). In reply to Re^2: Perl text processing
by AnomalousMonk
|
|