The problem is that you're passing back an array reference from the sub, and using it as-is (without dereferencing).
When you store this return value in yor @response array, the scalar value of the ref is stored as the first (and only) value of @response, and it is this you iterate over.
You must dereference the value you're getting back first, before storing it in your array, as shown in the first post above. Do a perldoc perlreftut for more info
In reply to Re: Array Reference (Again)
by amrangaye
in thread Array Reference (Again)
by Ronnie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |