buster_balz has asked for the wisdom of the Perl Monks concerning the following question:
system "/bin/date +%A > /tmp/day"; open (DAY, "/tmp/day") || die "Error opening file!"; $RUNDAY = (<DAY>); %Backup_Day = ( Sunday => "0", Monday => "1", Tuesday => "2", Wednesday => "3", Thursday => "4", Friday => "6", ); $SLOT = $Backup_Day{$RUNDAY}; print "Slot Number is $SLOT\n";
<jdporter added code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can I extract a Hash element by passing a variable to the hash?
by ikegami (Patriarch) on Jan 27, 2006 at 20:55 UTC | |
by Anonymous Monk on Jan 27, 2006 at 21:28 UTC | |
by ikegami (Patriarch) on Jan 27, 2006 at 21:39 UTC | |
|
Re: Can I extract a Hash element by passing a variable to the hash?
by chargrill (Parson) on Jan 27, 2006 at 20:45 UTC | |
|
Re: Can I extract a Hash element by passing a variable to the hash?
by CountZero (Bishop) on Jan 27, 2006 at 20:51 UTC |