There doesn't seem to be an 'undefined' warning (see perllexwarn), but turning off strict references together with 'uninitialized' warnings (both of these actions taken within the narrowest possible scope, of course) seems to do the trick.
c:\@Work\Perl\monks>perl -wMstrict -MData::Dump -le "my %res; ;; no strict qw(refs); no warnings qw(uninitialized); ;; @{$res{'act'}} = sort { return 0 unless $a->{'act'} =~ /^move/ and $b->{'act'} =~ /^move/; return $a->{'act'} cmp $b->{'act'}; } @{$res{'acts'}}; dd \%res; " { act => [] }
In reply to Re^2: Array reference error
by AnomalousMonk
in thread Array reference error
by sunil@perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |