Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: Parsing data from JSON response file.by Marshall (Canon) |
on Apr 13, 2020 at 03:12 UTC ( [id://11115412]=note: print w/replies, xml ) | Need Help?? |
Good idea. That is actually one of the first things I did when running the code. And then came the realization that $key wasn't used anywhere within the loop!
I guess this is "off topic", but a feature of Perl. If you have a constant like: use constant DEBUG => 1; and then have a statement like print "whatever line(s)" if DEBUG;, Perl is smart enough to eliminate this statement from the executable code when DEBUG is false (set to zero). For complex modules, I often leave code like that in the source. When I add a new feature, I turn debugging on. Print is your friend. I seldom need the Perl debugger.
In Section
Seekers of Perl Wisdom
|
|