Pearl elseif construction - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: Perl Programming Support (https://www.supportforums.net/forumdisplay.php?fid=31) +---- Thread: Pearl elseif construction (/showthread.php?tid=28518) |
Pearl elseif construction - lady4 - 06-06-2014 How to create a proper if/elseif construction Code: #!/usr/bin/perl The Perl if/else syntax The Perl if/else syntax is standard, I don't have any problems here: Code: if ($condition1) In Perl the "else if" syntax actually uses the elsif keyword. Here's some example code showing this syntax: Code: if ($condition1) While I'm in the neighborhood of Perl and tests (comparisons), here's a list of Perl's numeric and string comparison/equality operators: Code: Numeric Test String Test |