⭐ in reply to Revision controlled Perl DataStructure
use Data::Dumper qw/Dumper/; use IO::File; use strict; my %hash = { # Your data structure lies within %hash }; my $fn = "dump." . sprintf("%04d%02d%02d", (localtime)[5] + 1900, (loc +altime)[4] + 1, (localtime)[3]); my $fd = IO::File->new($fn, "w"); if (defined $fd) { print $fd Dumper(\%hash); $fd->close; };
Note that this code is very rough and should not be used in this form - A better revision would incorporate file locking, tests for file existence and better time stamping.
perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'
|
|---|