how to get a new subdirectory with date and time ?
hi
I have in a perl script following lines to create a subdirectory with date my @dt = localtime; my $subfolder_name = ((1900 + $dt[5]) * 100 + 1 + $dt[4]) * 100 + $dt[3]; mkdir "/tmp/$subfolder_name" or die "$subfolder_name: $!"; and subdirectory will be created like 20040220 but howto change it to get the date and time like 200402200800 ? regards cccc |
try something like:
Code:
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); |
All times are GMT -5. The time now is 02:01 PM. |