use POSIX qw( strftime ); use Time::Local qw( timegm ); print strftime("%a", gmtime(timegm(0, 0, 0, $day, $mon-1, $year)));