Help for this page

Select Code to Download


  1. or download this
    sub pl { $count == 1 ? 0 :1 } # check plural
     
    ...
    for $count (1..3) {
      print "There $are[pl] $count piece$s[pl] of pizza left!\n";
    }
    
  2. or download this
    There is 1 piece of pizza left!
    There are 2 pieces of pizza left!
    There are 3 pieces of pizza left!