foreach my $i ( 1 .. $scheduled_export_days ){ my %column_data_export; my %column_data_import; $column_data_export{SCHEDULE} = $schedule_hour; $column_data_export{UNDEF} = 1; my $debug=0; for my $act (@{$bi->{$customer}->{$domain}->{$host}->{BACKUPDATA}}){ ++$debug; my $imp_exp_type = $act->{ACTION_TYPE}; my $imp_exp_status = $act->{STATUS}; my @schedule_time = split(/:/, $schedule_hour); my $minutes_range = ($schedule_time[1]+30) % 60; # import code if ($imp_exp_type eq "IMPORT"){ my ($imp_formated_hour,undef) = hhmm($act->{ENDDATE_SEC},$unit) $column_data_import{SCHEDULE} = $imp_formated_hour; $column_data_import{UNDEF} = $debug ;#1 ; } # export code } push (@columns_export, \%column_data_export); push (@columns_import, \%column_data_import); } sub hhmm { my ($s,$unit) = @_; my @tmp = split / /,$unit->formatDateTime($s); my ($hr,$min) = split /:/, $tmp[1]; return ("$hr:$min",$tmp[0]); }