in reply to the axml parser v3.4
I'd strongly recommend that you use strictures (use strict; use warnings;) and declare variables so their scope is obvious. Global variables are generally frowned on as it can be pretty hard to figure out the relationship between setting and using them.
The three parameter form of open is much preferred to improve security and make io direction more explicit.
Code of the form:
for (...) { if (...) { ... } }
can be rewritten:
for (...) { next unless ...; ... }
to save a level of indentation and make the flow clearer. This becomes especially important where loops are nested.
... if ...;
is generally more Perlish than
if (...) {...;}
Perl allows labelled loops so rather than using a $break variable you can:
SCANNING: while (...) { ... for (...) { ... next SCANNING if ...; } ... }
|
|---|