- or download this
sub timestamp {
return localtime (time);
}
print '[' . timestamp() . ']: Normal Time Format'. "\n";
- or download this
[Sat Jan 8 11:59:07 2011]: Normal Time Format
- or download this
use Time::localtime;
sub timestamp {
...
}
print '[' . timestamp() . ']: Custom Time Format'. "\n";
- or download this
[2011-01-08_12:06:05]: Custom Time Format