#!/usr/bin/perl
use strict;
use warnings;
use Date::Manip;
####
$date_two_days_ago = ParseDate('3 days ago');
####
my $date_two_days_ago = ParseDate('3 days ago');
####
#!/usr/bin/perl
use strict;
use warnings;
use Date::Manip;
my $date_2_days_ago = ParseDate('3 days ago');
my $date_converted = UnixDate( $date_2_days_ago, '%e/%h/%Y' );
open DATA, '>', $ARGV[1];
open FH, $ARGV[0];
while () {
my(@tab_delimited_array) = split( /\t/, $_ );
$tab_delimited_array[3] =~ s/^\[//;
$tab_delimited_array[3] =~ s/^\-//;
chomp $tab_delimited_array[3];
if ( length $tab_delimited_array[3] > 1 ) {
my $date_format = UnixDate( $tab_delimited_array[3], '%Y%m%d%H:%M:%S' );
my $converted_date = Date_ConvTZ( $date_format, 'GMT', 'PST' );
my $pst_converted_date = UnixDate( $converted_date, '%e/%h/%Y:%H:%M:%S' );
$pst_converted_date =~ s/^\s//g;
my $extracted_YMD = UnixDate( $converted_date, '%e/%h/%Y' );
my @arr;
$_ =~ s/$arr[3]/$pst_converted_date/g;
if ( $extracted_YMD =~ /$date_converted/ ) {
print DATA $_;
}
}
}
close DATA;
close FH;
__DATA__