> On Oct 24, 2018, at 9:54 PM, Asad wrote:
>
> Thank all now I am able to progress :
>
> file1 i am able to extract the start and end timestamp
> file 2 i am able to extract the timestamp
>
> used the following
> my $t1 = Time::Piece->strptime('Feb 23 01:10:28 2018', '%b %d %H:%M:%S %Y'
Thank all now I am able to progress :
file1 i am able to extract the start and end timestamp
file 2 i am able to extract the timestamp
used the following
my $t1 = Time::Piece->strptime('Feb 23 01:10:28 2018', '%b %d %H:%M:%S
%Y'); coming from file1
my $t2 = Time::Piece->strptime('02/23/18 01:
Someone brought to my attention that I had failed to define a
couple of variables in the sample code I posted and they were
quite right. I don't mind sharing my work but the entire
application I wrote to get a brief local weather summary is
242 lines and I was trying to stay close to the topic, he
===> I am using the following regex :
([A-Z][a-z]{2}\s)([0-9]{2}\s[0-2][0-9](:[0-5][0-9]){2}\s[0-9]{4})
> Both are working as expected I would like to know if these are good regex
or it can be better , please suggest .
Concurring with the others, your setting yourself up for trouble with the
RE
I cannot emphasize enough how fragile the perhaps obvious regex based
comparisons of timestamps can be. I second the approach demonstrated by
Илья Рассадин above. There are subtle and difficult to debug problems
buried in timestamps. Not least of which is locale ambiguity,
discontinuities like da