Using store function to save array to a file : Storable « File « Perl






Using store function to save array to a file

    


use Storable;

@a = (1, 2, 3);

store(\@a, "array.dat");

@a2 = @{retrieve("array.dat")};

print $a2[1];

   
    
    
    
  








Related examples in the same category

1.Using store function to save hash value to a file