my $time_ = localtime;
my $date = ParseDate($time_);
$date =~ s/://g;
my $unix_date = UnixDate($date, @d_format);
$unix_date =~ s/ //g;
$ash_{date} = $unix_date;
$ash_{temp} = gct();
####
use POSIX 'strftime';
$ash_{date} = strftime $d_format[0], localtime;
####
my %cash = build_comp_hash();
push @aoh, { %cash };
graphable_arrays();
####
push @aoh, { build_comp_hash() };
####
@xdata = ();
@ydata = ();
my($i, $datum);
for $i (0 .. $#aoh){
for $datum (keys %{ $aoh[$i] }){
if($datum =~ m/date/){
push @xdata, $aoh[$i]{$datum};
}
elsif($datum =~ m/temp/){
push @ydata, $aoh[$i]{$datum};
}
else{}
}
####
@xdata = ();
@ydata = ();
for my $hash ( @aoh ) {
push @xdata, $hash->{ date };
push @ydata, $hash->{ temp };
}