zrzero has asked for the wisdom of the Perl Monks concerning the following question:
Some help or suggestions on cleaning this up would be nice... hehe.while (time) { $Seconds = substr(time,-3,1); if ($Seconds == 4&&$Factor != 1) { print "It begins."; $Factor = 1; } elsif ($Seconds == 5&&$Factor == 1) { print "It ends."; $Factor = 0; } $Input = <STDIN>; chomp($Input); if ($Input eq "time") { print time; print "\n"; } elsif ($Input eq "quit") { exit; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Input/Output Problem
by acid06 (Friar) on Sep 09, 2001 at 13:11 UTC | |
by dragonchild (Archbishop) on Sep 10, 2001 at 16:50 UTC |