As I meant to mention that in my original post, you could just use localtime.
my $slot = (localtime)[6]; # 0..6 for Sun..Sat if ($slot == 6) { $slot = undef; # undef for Sat. elsif ($slot == 5) { $slot = 6; # 6 for Fri. } print "Slot Number is $slot\n";
In reply to Re^3: Can I extract a Hash element by passing a variable to the hash?
by ikegami
in thread Can I extract a Hash element by passing a variable to the hash?
by buster_balz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |