in reply to Storable, reference help needed

Is there a reason you are storing a reference to a reference of an array?

Where you have store( \$baseline, $baseline_records ), maybe instead it should be store( $baseline, $baseline_records )?

This gives me identical output:

use Storable; use Data::Dumper; my $baseline_records = 'file.stor'; my $baseline = [ { 'LICount' => 0, 'LICountBase' => 0, 'LIFloat' => 0, 'LIFloatBase' => 0, 'LIICount' => 0, 'LIICountBase' => 0, 'ProjectID' => 'STO1019001', }, { 'LICount' => 0, 'LICountBase' => 0, 'LIFloat' => 0, 'LIFloatBase' => 0, 'LIICount' => 0, 'LIICountBase' => 0, 'ProjectID' => 'STO1018001', }, { 'LICount' => 38, 'LICountBase' => 38, 'LIFloat' => 0, 'LIFloatBase' => 0, 'LIICount' => 11, 'LIICountBase' => 11, 'ProjectID' => 'STO1005001', } ]; store( $baseline, $baseline_records ); my $arrayref = retrieve($baseline_records); print Dumper $baseline, $arrayref;

l8rZ,
--
andrew

Replies are listed 'Best First'.
Re^2: Storable, reference help needed
by spstansbury (Monk) on Sep 28, 2010 at 17:07 UTC
    Thank you!