#!/usr/bin/perl use strict; my $days; do { print "Enter a positive, non-zero integer ('q' to quit).\n> "; $days = <STDIN>; my $num = int $days; if($num > 0) { print "good '$num'\n"; } else { print "'$num' is not > 0\n"; } } while(! ($days =~ m/^q/) );
In reply to Re: String/Numeric Manipulation
by superfrink
in thread String/Numeric Manipulation
by Ms. T.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |