Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: if-elsif weirdness

by japhy (Canon)
on May 21, 2003 at 15:36 UTC ( [id://259750] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ($x) {
      print 1;
    }
    elsif ($x != 2) {
      print $y;
    }
    
  2. or download this
    print 1,
    2,
    3,
    undef,
    4;
    
  3. or download this
    if ($x) { ... }
    elsif (do {; $x == 2}) { ... }