Help for this page

Select Code to Download


  1. or download this
    printf ("%d %s%s\n", $count, "cat", ($count==1)?"":"s");
    printf ("%d %s%s\n", $count, "cact", ($count==1)?"us":"i");
    printf ("%d %s%s\n", $count, "Elvi", ($count==1)?"s":"i");
    
  2. or download this
    print $count, "cat", (($count==1)?"":"s"), "\n";
    print $count, "cact", (($count==1)?"us":"i"), "\n";
    print $count, "Elvi", (($count==1)?"s":"i"), "\n";
    
  3. or download this
    sub quantize
    {
         my ($quantity, $singular, $plural) = @_;
    ...
    $count = 2;
    
    print "$count @{[quantize($count,'cat','cats')]}\n";