rajeshatbuzz has asked for the wisdom of the Perl Monks concerning the following question:
Convert this time into readable time in perlif ($file =~ /Rajesh.(\d+).*/) { print $1; }
find Current time and compare...my $sec = 0; # Not Feeded my $min = 19; my $hour = 22; my $day = 24; my $mon = 02 - 1; my $year = 2012 - 1900; my $wday = 0; # Not Feeded my $yday = 0; # Not Feeded my $unixtime = mktime ($sec, $min, $hour, $day, $mon, $year, $wday, $y +day); print "$unixtime\n"; my $readable_time = localtime($unixtime); print "$readable_time\n";
But the problem here is, I am not getting solution of how to extract 2 digit from $1 and assign to $sec, $min, etc... Any help????? Also, if you have good approach for this problem statement, Please share with memy $CurrentTime = time(); my $Todaydate = localtime($startTime);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Convert Old Unix Date to Perl and compare
by JavaFan (Canon) on Feb 27, 2012 at 12:40 UTC | |
by thargas (Deacon) on Feb 27, 2012 at 18:19 UTC | |
by JavaFan (Canon) on Feb 27, 2012 at 19:32 UTC | |
by FloydATC (Deacon) on Feb 27, 2012 at 14:16 UTC | |
|
Re: Convert Old Unix Date to Perl and compare
by TomDLux (Vicar) on Feb 27, 2012 at 19:39 UTC | |
|
Re: Convert Old Unix Date to Perl and compare
by Anonymous Monk on Feb 27, 2012 at 21:41 UTC |