in reply to DATE =TO= DAY OF WEEK

Or you could use Time::Local to turn a date spec into an epoch time (as returned by time), then give that to localtime--from the docs:
$time = timelocal($sec,$min,$hours,$mday,$mon,$year);
So, for your case:
use Time::Local; my $time = timelocal(0, 0, 0, 21, 4, 1981); my $wday = (localtime $time)[6];