How do you read the system time and date in Perl?

后端 未结 5 1389
太阳男子
太阳男子 2021-01-11 17:13

I need to read the system clock (time and date) and display it in a human-readable format in Perl.

Currently, I\'m using the following method (which I found here):

5条回答
  •  不知归路
    2021-01-11 17:31

    Like someone else mentioned, you can use localtime, but I would parse it with Date::Format. It'll give you the timestamp formatted in pretty much any way you need it.

提交回复
热议问题