|No such thing as a small change|
Re: A Simple Question From A Simple Manby kcott (Abbot)
|on Oct 10, 2012 at 23:19 UTC||Need Help??|
Welcome to the monastery.
In your code, $rocks and @rocks are two entirely different variables. Variables with a $ are scalar values; those with an @ are arrays.
When you use brackets () in the manner shown in your code, you are creating a reference to an array (typically just called an arrayref) - that's what ARRAY(0x1434d80) is referring to. You can also get a reference to an array by putting a backslash in front of the array name (e.g. \@array_name).
You can access elements of an array with this syntax: $array_name[index] (where index is an integer). You can access elements of an arrayref with this syntax: $array_ref->[index] (again, index is an integer).
Here's an extension to the code you posted showing all of these:
Finally, if you just want to "get some interaction going with my fellow Monks", you can use the Chatterbox (typically referred to as the CB) which should be on the panel to your right.