Answer 1: localtime returns a formatted date string if it knows you want a scalar rather than an array.
Answer 2a:
my $day = qw(Sun Mon Tue Wed Thu Fri Sat)[(localtime)[6]];
Answer 2b:
use Date::Calc qw(:all); my $day = Day_of_Week_to_Text(Day_of_Week(Today()));
-b
In reply to Re: getting day of the week
by bgreenlee
in thread getting day of the week
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |