On 06/29/2018 09:32 AM, Mike Martin wrote:
Hi
I am trying to convert a string of the format
2018-01-01 16-45-21-654278

to a proper timestamp string

so basically I want to replace all -  after the date part


i am not sure what you are trying to do. show the after text that you want. a proper timestamp string is not specific enough.

if you want to really parse that string, then use Time::Piece and its strptime sub which can parse pretty much any time/date string.

uri

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to