in reply to Symbolic references disallowed
Others told you how you should do it, so I'll just explain the error. When you say @$array, you're saying, "the array pointed to by the reference contained in $array." Since your $array contains a text string instead of an array reference, the fallback (Perl 4) way to handle that would be to use the value of the scalar as the name of the array, giving you @TEST in this case. However, this is ugly and dangerous, so strict refs does not allow it.
Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Symbolic references disallowed
by davido (Cardinal) on Apr 18, 2012 at 20:25 UTC |