Perl Monk, Perl Meditation | |
PerlMonks |
Re: Array shuffle code produces 'Modification of non-creatable array value attempted' errorby Anonymous Monk |
on May 29, 2015 at 19:42 UTC ( [id://1128337]=note: print w/replies, xml ) | Need Help?? |
The probable cause is passing an empty array to shuffle: shuffle([]);Suggested fix: my $i = @$array || return;
In Section
Seekers of Perl Wisdom
|
|