I think your question has been answered pretty thoroughly... I'd like to point out that it's a phenomenally good idea to ensure that there is only one point of entry for any bit of information you need to keep track of in a program...
Setting up the $ValidTest variable is a good idea... but if you'd used it throughout the script, instead of the multiple instances of '8594', you might have spotted one of the issues much sooner. Or simply not had it.
I don't mean to be critical, just helpful... I found that, particularly for long chunks of code, my life was made much simpler when I went on a 'multiple-point-of-data-entry jihad'. I believe there is a lot of good, solid research on this.... I just can't point you to it at the moment :)
Pragmatic Programmer has a section or four discussing this, now that I think about it. Good book to read straight through too.
markguy
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.