... when I first started perl, whenever I tried to use "my" my program wouldn't work.
It would have been very useful to have explored the reasons why your use of lexical variables wouldn't work. It's not too late to begin!
... packages ... just [seem] more stable.
Package data is global data. Global data is, IMHO, always problematic.
The story goes that during one of the Pearl Harbor attacks on December 7, 1941, General Walter Short, commander of the Army forces in Pearl, was struck in the chest by a spent 50-caliber machinegun round and knocked to the ground. The bullet's impact didn't even break the skin, but when someone picked it up and showed it to Short, he said "It would have been better if it had killed me."
When the day comes (and come it will if it has not already) that you are knocked on your ass by a chunk of global data at the end of a long trajectory from its point of origin, you may have some of the same feelings.
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||