#!/usr/bin/perl use strict; use warnings; use diagnostics; use Data::Dumper; my @array; my %hash; #save the array open (FILE,">array.dat"); print FILE Data::Dumper->Dump([\@array],['*array']); close (FILE); #save the hash open (FILE,">hash.dat"); print FILE Data::Dumper->Dump([\%hash],['*hash']); close (FILE); # read in the array open (FILE,"array.dat"); undef $/; eval ; close(FILE); # read in the hash open (FILE,"array.dat"); undef $/; eval ; close(FILE); exit;