Perl – How to elegantly print the date in RFC822 format in Perl

datedatetimeperlrfc822

How can I elegantly print the date in RFC822 format in Perl?

Best Solution

use POSIX qw(strftime);
print strftime("%a, %d %b %Y %H:%M:%S %z", localtime(time())) . "\n";