in reply to getting day of the week

Weekday:
($wday) = (split '\s' , scalar localtime)[0];