Tuesday, April 22, 2014

POSIX date perl

to print posix date in perl, no need to use POSIX.

Old style:

  DB<2> use POSIX;

  DB<3> print asctime(localtime(time))
Tue Apr 22 16:17:49 2014

  DB<4> 

New style:

print scalar ( localtime (time))
Tue Apr 22 16:18:30 2014

Labels: , , , ,

0 Comments:

Post a Comment

<< Home