use Storable; store (\@array, "/path/to/array.dat"); my @newarray = @{retrieve("/path/to/array.dat")};