in reply to Re: data structure advice please
in thread data structure advice please

you could shorten
$saved_info = $fileinfo{$_} ||= []; push @$saved_info,\@filedata;
to
push @{ $fileinfo{$_} }, \@filedata;
beacause the arrayref will be autovivified if it didn't already exist.

Replies are listed 'Best First'.
Re^3: data structure advice please
by clinton (Priest) on Nov 25, 2006 at 19:59 UTC
    True. I thought it may have complained that 'undef' (the initial value of $fileinfo{$_}) was not an array ref, but after testing it, I see it doesn't.