my $rand = int(rand(4)); if ( 0 == $rand ) {} elsif ( 1 == $rand ) {} … etc
Don’t use perl4 style unless you know why you’re doing it, c.f. &subname (carries @_ context) instead of subname(). Always use strict and warnings. This seems XY and maybe solved elsewhere: Data::Random.
In reply to Re: Show different text based on random number
by Your Mother
in thread Show different text based on random number
by htmanning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |