It'll be easier to avoid this sort of bothersome (and embarrassing) glitch if you try one or more of the following strategies when writing your code:
- Put some line breaks with proper indentation into that list -- e.g.:
my ( $my_tgid_list, $my_switchClli_list,
$my_btfn_list, $my_custClli_list,
...
);
- Don't declare all those lexical variables in one place -- if a bunch of them are only being used within relatively small blocks of code, their names should really only occur within those blocks, not at the top of a long script.
- Consider grouping some of those variables into hashes -- e.g.:
my @common_keys = qw/custClli switchClli trkCount tgid btfn flag locat
+ion ldn .../;
my ( %tmp, %mylist ); # use @common_keys with each hash
Regarding the second point, maybe that long declaration line you posted is already properly "localized", such that all those variables really are required throughout the scope of the code block that contains that line. But if that code block is a whole big long script, you might need to think more carefully about design, and how to make your code more modular. At the very least, it may still be helpful to move some declarations closer to where they actually get used.
OTOH, if you are just declaring all your variables with "my" at the top of your script regardless of where they actually get used, then you are missing out on some of the important advantages of "use strict" and lexically scoped "my" variables.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.