in reply to Re: Can I extract a Hash element by passing a variable to the hash?
in thread Can I extract a Hash element by passing a variable to the hash?

Thanks, that did the trick.
  • Comment on Re^2: Can I extract a Hash element by passing a variable to the hash?

Replies are listed 'Best First'.
Re^3: Can I extract a Hash element by passing a variable to the hash?
by ikegami (Patriarch) on Jan 27, 2006 at 21:39 UTC

    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";