@rocks is an array, and $rocks is a scalar (an arrayref), they are different variables, they are not the same
If you had used strict you would have been warned
See Tutorials Data Types and Variables,the basic datatypes, three
In reply to Re: A Simple Question From A Simple Man
by Anonymous Monk
in thread A Simple Question From A Simple Man
by TinkerTantrum
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |