#!/usr/bin/perl -w



# a subroutine with no parameters
sub insult
{
	if (rand() < 0.5) {
		print "You're momma is so ugly ... man-cows are afraid of her\n";
	}
	else {
		print "You're dad's so stupid ... he thinks the Village People are cool.\n";
	}
}

# a subroutine with one input and one return
sub check
{
	local $in = shift; # grab the first paramater
	return 1 if (length($in) != 0);
	return 0;

}

do {
	insult();
	print "Hey!  Enter your name: ";
	$input = <STDIN>;
	chomp($input);    # discard any terminating \n's

} while (!check($input));
print "Oh.  Sorry $input.  You're cool\n";
