in reply to Can't retrieve with storable

retrieve returns a reference, just like store takes a reference as an argument.

So, you're assigning an array reference to @array2. You can do either:

@array2 = @{retrieve("file")} ...
or
my $aref = retrieve("file") or die "Cannot retrieve\n"; print @$aref;
See perlref for more info about references.