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

后端 未结 5 1430
太阳男子
太阳男子 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:35

    The simplest one-liner print statement to print localtime in clear, readable format is:

    print scalar localtime (); #Output: Fri Nov 22 14:25:58 2019
    

提交回复
热议问题