[prog] Little Perl Question

Jenn Vesperman jenn at anthill.echidna.id.au
Mon Sep 30 23:11:57 EST 2002


On Mon, 2002-09-30 at 22:55, Malke Routh wrote:

> how do I specify that the first number always has to be bigger than the
> second number?

if ($first_number > $second_number) {
	$first_number - $second_number
} else {
	print_error_message("error message goes here")
}

Note that that is NOT in Perl syntax, you'll need to check your Perl
book to determine how to use the if and how to print the error message.

But that should tell you how to do it.


Jenn V.
-- 
    "Do you ever wonder if there's a whole section of geek culture 
        	you miss out on by being a geek?" - Dancer.

jenn at anthill.echidna.id.au     http://anthill.echidna.id.au/~jenn/





More information about the Programming mailing list