Help for this page

Select Code to Download


  1. or download this
    for my $i (1..2)
    {
    ...
      };
      print "i = $i, v = $v\n";
    }
    
  2. or download this
    $v = do {if ($i == 1) { "one" } else { "not one" };
    $v = $i == 1 ? "one" : "not one";