in reply to Re^2: Converting 24 hour time back into 12 hour
in thread Converting 24 hour time back into 12 hour
Thanks for this illustration. I have some small suggestions, however.
Cleaning this up gives us:
use POSIX 'strftime'; print strftime ('%I:%M:%S %p - %a, %B %d, %Y', localtime (time)) . "\n +";
I prefer the brevity of this and think it aids clarity. However, here's the same but with 2 named variables just for completeness:
use POSIX 'strftime'; my $format = '%I:%M:%S %p - %a, %B %d, %Y' . "\n"; my @time = localtime (time); print strftime ($format, @time);
|
|---|