in reply to Generate Multi-word Anagrams
The error is:$size[$_] = @{ $list[ $_ ] } for 1..$phrase_length;
I fixed it with this:Can't use an undefined value as an ARRAY reference at anagram.pl line +34.
(I didn't find an easier way, though I didn't look too hard.)for my $length ( 1..$phrase_length ) { my $ref = ref $list[ $length ]; $size[$length] = ( $ref =~ /ARRAY/ ? @{ $list[ $length ] } : 0 ); }
I'd be interested in seeing any improvements you (or anyone else) has made to this offline.
-QM
--
Quantum Mechanics: The dreams stuff is made of
|
|---|