our %info = (version => "0.3" format => 0, ... elite => 1, );
Larry Wall's rule for how to arrange things is put the important stuff first, and in this case the message can server as documentation as well as a debugging string, so should probably go first.print "This is a debug message\n" if ($debug);
return and "Failed to login\n" unless ($http_res->is_success);
foreach my $d (@data) { if ($d->[5] == 1) { ... } }
Of course, many of these are a matter of style; those are just my first impressions.
Overall, looks like a nicely written script. Thanks for posting it!
In reply to Re: Code optomization
by sgifford
in thread Code optomization
by sock
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |