#!/your/perl/here use strict; use warnings; my $rand = rand; if ( $rand < rand ) { print "if1: $rand\n"; } elsif ( $rand < rand ) { print "elsif2: $rand\n"; } else { print "else3: $rand\n"; } #### elsif ( ( $rand < rand ) { print "elsif2: $rand\n"; } #### syntax error at C:\if_elsif.pl line 12, near ") {" #### elsif ( $rand < _rand ) { print "elsif2: $rand\n"; } #### Bareword "_rand" not allowed while "strict subs" in use at C:\if_elsif.pl line 7. #### Argument "_rand" isn't numeric in numeric lt (<) at C:\Perl\perlmonks\if_elsif.pl line 7.