All pastes #418678 Raw Edit

Unnamed

public text v1 · immutable
#418678 ·published 2007-03-31 19:34 UTC
rendered paste body
#!/usr/bin/perl  -w
#slots

if(@ARGV !=1) {

print "Usage: perl $0 <amount>\n";

exit;}

($amount) = @ARGV;



sub one {return int(rand(3) + 1);}
$result=one();
sub two {return int(rand(3) + 1);}
$two=two();
sub three {return int(rand(3) + 1);}
$three=three();



if ($result) {
		if (($result == $two) && ($result == $three))
	{ 
		if ($result == 1) {print "[ $result ][ $two ][ $three ]\tYour money x2 ->", 2*$amount, "\n"}
		elsif ($result == 2) {
		print "[ $result ][ $two ][ $three ]\tYour money x5 ->", 5*$amount, "\n"}
		elsif ($result == 3) {print "[ $result ][ $two ][ $three ]\tYour money x20 ->", 20*$amount, "\n"}
		}
			else { print "[ $result ][ $two ][ $three ]\n" }

	}