[prog] Little Perl Question
Malke Routh
malke at attbi.com
Mon Sep 30 13:06:33 EST 2002
On Mon, 2002-09-30 at 06:40, Susan Peterson wrote:
> Use a an if to test if the number1 > number2, does that make sense,
> and increment number1 inside the if statement.
> Susan
>
>
>
> -----Original Message-----
> From: programming-admin at linuxchix.org
> [mailto:programming-admin at linuxchix.org]On Behalf Of Malke Routh
> Sent: Monday, September 30, 2002 7:56 AM
> To: Programming at LinuxChix
> Subject: [prog] Little Perl Question
>
>
> Hi - I'm teaching myself Perl (my first programming language!), so am a
> rank beginner. I'm writing a little Perl program based on the math quiz
> in "Elements of Programming with Perl". Basically, my quiz runs through
> simple addition, multiplication, subtraction, and division using random
> numbers from 0-12 inclusive. I've done alright with addition and
> multiplication, but in subtraction, I don't want negative numbers. If
> I'm doing something like:
>
> $first_number - $second_number
>
> how do I specify that the first number always has to be bigger than the
> second number?
Thanks, Susan. That did it. I appreciate the help.
Cheers,
Malke
--
Elephant Boy Computers
www.elephantboycomputers.com
"Don't Panic!"
More information about the Programming
mailing list