Alex Rivera | Logout

In Perl, how can I write the output of Dumper to a file?

Asked 2009-07-14T15:07:53.443
10

How can I make Data::Dumper write a dump into a file?

Edit
Report

1 Answer

8

The question is a bit unclear, but are you looking for something like this?

open my $FH, '>', 'outfile';
print $FH Dumper(\%data);
close $FH;

You can restore the data later by using eval.

answered 2009-07-14T15:20:47.273

Your Answer