use warnings; use strict; print "Please give me a number:\n"; my $initial_number = <STDIN>; chomp $initial_number; while (1) { print "Please continue with a new number:"; my $new_number = <STDIN>; chomp $new_number; if ($new_number < $initial_number) { print "You specified a number which is smaller than the previo +us. The program will now exit\n"; exit; } $initial_number = $new_number; }
In reply to Re: Any tips on this?
by toolic
in thread Any tips on this?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |