DrManhattan asked my why I used local $keys; and I pointed out that the idea was to determine if his keys or notebook were present…or local ;-) Thanks to DrManhattan for his assistance in making this actually run
#! /usr/bin/perl use Time::Object; my $time = localtime; my $boss="Mark"; local $keys; local $notebook; my $lunch = 1 if ($time->hour >12 and $time->hour <13); if ($keys and $notebook) { print "$boss is in the building but likely in the restroom \n" +; } elsif ($keys and !$notebook) { print "$boss is likely in the building and in a meeting n"; } elsif ($notebook and !$keys) { if ($lunch) { print "$boss is likely gone for lunch \n"; } else { print "$boss is likely gone for the day \n"; } } elsif (!$keys and !$notebook) { print "$boss is likely at an off-site meeting and may not retu +rn \n"; } else { print "I really don't know where $boss is as he appears to be +once again defying all logic \n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Where is the boss?
by DrManhattan (Chaplain) on Apr 09, 2003 at 22:19 UTC | |
by phydeauxarff (Priest) on Apr 09, 2003 at 22:22 UTC | |
by DrManhattan (Chaplain) on Apr 09, 2003 at 22:26 UTC | |
Re: Where is the boss?
by Juerd (Abbot) on Apr 10, 2003 at 01:10 UTC | |
by phydeauxarff (Priest) on Apr 10, 2003 at 01:13 UTC |