Yes, there are multi-dimensional arrays as well - we normally call them Arrays of Arrays (AoA). And accessing them is as easy as
$array[3][4][0], but in order to understand them properly, you'll have to learn about the different data types in perl: scalars, arrays and hashes ... and references.
If you have access to a computer with installed perl, I suggest, you open up a command line shell and try typing perldoc perl. You could follow this up by perldoc perldata and perldoc perlreftut ... then you'll understand some more. And if you have questions, come back and ask here - that's what we are here for, after all.
If you don't have perl installed, then you could also read this up online at http://www.perldoc.com - though I can promise you'll soon want to start playing around with perl ;-)
If you add extra elements, what would their coordinates be
Whatever you choose them to be. You can add elements to the front, to the back or into the middle of an array. Sorry, but with your current level of knowledge that has to be sufficient as an explanation ...
-- Hofmator
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.