Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
how to use "else" with this conditional scheme:
my $a = 6;
print "yes" if $a == 6;
i know the other classic way works
my $a = 6;
print "yes" if $a == 6;
i know the other classic way works
my $a = 2; if ($a == 6) {print "yes";} else {print "no";}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: if else in the other way
by jwkrahn (Abbot) on Oct 02, 2010 at 06:29 UTC | |
Re: if else in the other way
by chromatic (Archbishop) on Oct 02, 2010 at 06:41 UTC | |
Re: if else in the other way
by Marshall (Canon) on Oct 02, 2010 at 13:43 UTC | |
Re: if else in the other way
by CountZero (Bishop) on Oct 02, 2010 at 12:59 UTC | |
Re: if else in the other way
by biohisham (Priest) on Oct 02, 2010 at 10:29 UTC | |
by johngg (Canon) on Oct 02, 2010 at 12:12 UTC | |
by biohisham (Priest) on Oct 02, 2010 at 13:28 UTC | |
by eyepopslikeamosquito (Archbishop) on Oct 02, 2010 at 22:01 UTC | |
Re: if else in the other way
by snoopy (Curate) on Oct 04, 2010 at 23:41 UTC |
Back to
Seekers of Perl Wisdom