in reply to Re: How to convert time stamp to unix time ?
in thread How to convert time stamp to unix time ?
The regex
/^(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/
could surely be shortened to
m{ \d{2} }xmsg
>perl -wMstrict -le "my $stamp = '100117104030'; my ($YY, $MM, $DD, $hh, $mm, $ss) = $stamp =~ m{ \d{2} }xmsg; print $stamp; print qq{$YY $MM $DD $hh $mm $ss}; " 100117104030 10 01 17 10 40 30
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to convert time stamp to unix time ?
by Your Mother (Archbishop) on Feb 03, 2010 at 18:27 UTC | |
by AnomalousMonk (Archbishop) on Feb 04, 2010 at 07:16 UTC | |
|
Re^3: How to convert time stamp to unix time ?
by Anonymous Monk on Feb 03, 2010 at 17:54 UTC | |
by AnomalousMonk (Archbishop) on Feb 04, 2010 at 07:10 UTC |