$ perle 'my $wday = (localtime)[6]; print $wday;' 6