in reply to Four or five ways we can make or break an array?
@$array = (1, 2, 3); what?!
Treat $array as an array reference, and assign the list to that array.
If $array already points to an array, overwrite that array with the list.
If $array is undef, create (autovivify) an array and assign a reference to it to $array.
If $array currently has any value other than undef or an array reference, and strict is in force, die.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Four or five ways we can make or break an array?
by theantler (Beadle) on Mar 20, 2010 at 12:57 UTC |