Help for this page

Select Code to Download


  1. or download this
        my @bottles_of_beer
           = map {join "", "$_ bottle", $_ ne 1 && 's' || '', " of beer"},
    ...
                "Take one down, pass it around,\n",
                "@bottles_of_beer[--$n] on the wall.\n";
        }
    
  2. or download this
        sub bottles {
            my ($n) = @_;
    ...
            say  bottles($_ - 1), " of beer on the wall.";
            say  "";
        }