#!/usr/bin/perl -w use strict; my $beer = abs shift || 99; print how_many($beer), ",\n", how_many($beer), ".\n", "Take one down, pass it around,\n", how_many(--$beer), ".\n\n" while $beer; sub how_many { my $numb = shift; return $numb . ' bottle' . ($numb == 1 ? '' : 's') . ' of beer on the wall' ; }