Dear Monks, I'm having problems trying to dump an array of hashes into a file, so I can use the data structures in another program. Could you please help?
My structure looks like this:
I can populate the array of hashes, but how do I dump it?
I have tried the following, but it doesn't work:
open (FILE, "> diskstats.perldata") or die "can't open diskstats: $!";
print FILE Data::Dumper->Dump([\@disk_stats]);
close FILE or die "can't close diskxstats: $!";
How would I read it back into a program as well?
I have read the documentation for Data::Dumper, but still cannot figure out how to do it?