![]() |
|
|
+ Search |
![]()
|
Jun 16th, 2001 11:10
Per M Knutsen,
Use the use Data::Dumper module from CPAN.
# call the dumper module
use Data::Dumper;
... create your structure here
# Call sub-routine
dump_struc(\%structure);
# sub-routine for dumping structures to disk.
sub dump_struc {
my ($struc) = @_;
open (OUTPUT_FILE, "> $output_file") || die "cannot open file";
print OUTPUT_FILE Data::Dumper->Dump([$struc], ['*structure']);
close OUTPUT_FILE;
}