http://www.perlmonks.org?node_id=1004356


in reply to Want to format date and time

Well the current local time is returned by localtime

Formatting that time can be done in many different ways in Perl. The quickest way is probably to use the Posix strftime function.

Putting the two together gives:

use POSIX; print strftime( "%d/%y/%Y", localtime());
A Monk aims to give answers to those who have none, and to learn from those who know more.