in reply to Newbie: 'For loops'
“References” are a key concept in Perl. They are “a single, scalar thing” that refers to something else ... such as an array or a hash. Furthermore, it is quite common that the array or hash thus-referenced has no other existence except that some variable(s) refer to it. (It is an “anonymous” value.) They are vaguely like pointers in C, but much more refined: when you use one, unlike a C pointer, you’re not pointing a loaded revolver in the general direction of your foot.
Spending a little time with the Perl tutorials, such as perldoc perl and other docs referenced thereby such as perldoc perlintro, will help enormously in “getting a feel for the Perl way of doing things,” which is always-elegant but not-always-quite obvious at times. Since you already know other programming languages, the time of disorientation and confusion will very quickly pass. Just don’t try to apply too directly, too literally, what you know from those other languages. One of the mantras of Perl is TMTOWTDI: “There’s More Than One Way To Do It.™” It takes a little time to realize just how important, and how pervasive, that notion really is around these parts. At first, you might find it curious – even a little-bit quaint. But there is a deep reason for it, as you will see.