I realize this is probably homework, but you
shouldn't do this. Any time you find yourself naming variables var1, var2, var3, etc., that's a very good sign that they should be in some kind of array or hash. If there were ever a reason to break a large array up into smaller ones and have them numbered, you'd want to break it up into
@{$array[0]}, @{$array[1]}, @{$array[2]}, etc. An array of arrays, with each sub-array limited to whatever size you like, but with them organized inside a top-level array so you don't have to start doing goofy stuff with eval or globs to get the variable names numbered the way you like.
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.