#! /usr/bin/perl -w use strict; use Data::Dumper; $Data::Dumper::Indent = 0; use vars qw/$xpdat1 $dat1 $makedat/; my $datafile = shift or die "No data file specified on command line.\n"; my $today = localtime(time); my $root; eval "require '$datafile'" or die "bad eval: $@\n"; $root->{DATA} = $dat1; $root->{XP} = $xpdat1; $root->{MAKE} = $makedat; open DAT, ">$datafile" or die "Cannot open $datafile for output: $!\n"; print DAT Data::Dumper->Dump( [$root], ['$root'] ); close DAT;