sorry program botolnya salah :-)
saya kurang memperhatikan infleksi.
ini yg bener:

$n = 5;
sub bottle { my $n = shift; $n < 2 ? "$n bottle" : "$n bottles" }
while ($n) {
    print <<"BOTOL";
${\bottle $n} of beer on the wall
${\bottle $n} of beer
Take one down, pass it around
${\bottle --$n} of beer on the wall

BOTOL
}

print "No more beer on the wall :-(\n";

__END__

mirip dng yg punya ruby kan? :-)

bottles = lambda {|n| n == 1 ? "#{n} bottle" : "#{n} bottles"}
sep = "~" * 32

99.downto 1 do |n|
  puts "#{sep}
#{bottles[n]} of beer on the wall
#{bottles[n]} of beer
Take one down, pass it around
#{bottles[n - 1]} of beer on the wall"
end

puts sep
puts "\n No more beer on the wall :-("

rgds,
Edwin



      ________________________________________________________ 
Bergabunglah dengan orang-orang yang berwawasan, di di bidang Anda! Kunjungi 
Yahoo! Answers saat ini juga di http://id.answers.yahoo.com/

Kirim email ke