The stupid question is the question not asked | |
PerlMonks |
Iterating and pattern matching on input fileby bartrad (Beadle) |
on Jul 31, 2018 at 19:33 UTC ( [id://1219595]=perlquestion: print w/replies, xml ) | Need Help?? |
bartrad has asked for the wisdom of the Perl Monks concerning the following question: Hi all, after some advice. I'm opening a file and reading through it and look for some key values after the "Count:" text, but my next if's don't seem to be working properly (as they're probably not doing what I think they're doing) and instead it seems to be ignoring the next ifs and just picking up every occurrence of "Count:" The input file
My Code
Printing out $checks{port}{$stage} shows:
When it should only show 23 for $checks{port}{$stage} and 4 for $checks{l3}{$stage}... And a Dumper
Note, there's other occurrences of "Count" it's picking up but I only included two from the data source to keep things short. Any help is greatly appreciated.
Back to
Seekers of Perl Wisdom
|
|