Skip to main content
Commonmark migration
Source Link

#Perl 5, 243 bytes

Perl 5, 243 bytes

A shorter Perl 5 solution is posted as a community wiki solution here.

$}=" bottle";$s='s';$o=" of beer";$w=" on the wall";$i=99;while($i>1){say"$i$}$s$o$w, $i$}$s$o.";$s=''if--$i<2;say"Take one down and pass it around, $i$}$s$o$w.\n"}say"$i$}$s$o$w, $i$}$s$o.";say"Go to the store and buy some more, 99$}s$s$o$w."

Using the free -M5.010 switch for "say" instead of "print".

Cheers.

#Perl 5, 243 bytes

A shorter Perl 5 solution is posted as a community wiki solution here.

$}=" bottle";$s='s';$o=" of beer";$w=" on the wall";$i=99;while($i>1){say"$i$}$s$o$w, $i$}$s$o.";$s=''if--$i<2;say"Take one down and pass it around, $i$}$s$o$w.\n"}say"$i$}$s$o$w, $i$}$s$o.";say"Go to the store and buy some more, 99$}s$s$o$w."

Using the free -M5.010 switch for "say" instead of "print".

Cheers.

Perl 5, 243 bytes

A shorter Perl 5 solution is posted as a community wiki solution here.

$}=" bottle";$s='s';$o=" of beer";$w=" on the wall";$i=99;while($i>1){say"$i$}$s$o$w, $i$}$s$o.";$s=''if--$i<2;say"Take one down and pass it around, $i$}$s$o$w.\n"}say"$i$}$s$o$w, $i$}$s$o.";say"Go to the store and buy some more, 99$}s$s$o$w."

Using the free -M5.010 switch for "say" instead of "print".

Cheers.

replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

#Perl 5, 243 bytes

A shorter Perl 5 solution is posted as a community wiki solution herehere.

$}=" bottle";$s='s';$o=" of beer";$w=" on the wall";$i=99;while($i>1){say"$i$}$s$o$w, $i$}$s$o.";$s=''if--$i<2;say"Take one down and pass it around, $i$}$s$o$w.\n"}say"$i$}$s$o$w, $i$}$s$o.";say"Go to the store and buy some more, 99$}s$s$o$w."

Using the free -M5.010 switch for "say" instead of "print".

Cheers.

#Perl 5, 243 bytes

A shorter Perl 5 solution is posted as a community wiki solution here.

$}=" bottle";$s='s';$o=" of beer";$w=" on the wall";$i=99;while($i>1){say"$i$}$s$o$w, $i$}$s$o.";$s=''if--$i<2;say"Take one down and pass it around, $i$}$s$o$w.\n"}say"$i$}$s$o$w, $i$}$s$o.";say"Go to the store and buy some more, 99$}s$s$o$w."

Using the free -M5.010 switch for "say" instead of "print".

Cheers.

#Perl 5, 243 bytes

A shorter Perl 5 solution is posted as a community wiki solution here.

$}=" bottle";$s='s';$o=" of beer";$w=" on the wall";$i=99;while($i>1){say"$i$}$s$o$w, $i$}$s$o.";$s=''if--$i<2;say"Take one down and pass it around, $i$}$s$o$w.\n"}say"$i$}$s$o$w, $i$}$s$o.";say"Go to the store and buy some more, 99$}s$s$o$w."

Using the free -M5.010 switch for "say" instead of "print".

Cheers.

added 5 characters in body
Source Link
LukStorms
  • 1.8k
  • 1
  • 12
  • 11

#Perl 5, 243 bytes

A shorter Perl 5 solution is posted as a community wiki solution here.

$}=" bottle";$s='s';$o=" of beer";$w=" on the wall";$i=99;while($i>1){say"$i$}$s$o$w, $i$}$s$o.";$s=''if--$i<2;say"Take one down and pass it around, $i$}$s$o$w.\n"}say"$i$}$s$o$w, $i$}$s$o.";say"Go to the store and buy some more, 99$}s$s$o$w."

Using the free -M5.010 switch for "say" instead of "print".

Cheers.

#Perl 5, 243 bytes

A shorter Perl 5 solution is posted as a community solution here.

$}=" bottle";$s='s';$o=" of beer";$w=" on the wall";$i=99;while($i>1){say"$i$}$s$o$w, $i$}$s$o.";$s=''if--$i<2;say"Take one down and pass it around, $i$}$s$o$w.\n"}say"$i$}$s$o$w, $i$}$s$o.";say"Go to the store and buy some more, 99$}s$s$o$w."

Using the free -M5.010 switch for "say" instead of "print".

Cheers.

#Perl 5, 243 bytes

A shorter Perl 5 solution is posted as a community wiki solution here.

$}=" bottle";$s='s';$o=" of beer";$w=" on the wall";$i=99;while($i>1){say"$i$}$s$o$w, $i$}$s$o.";$s=''if--$i<2;say"Take one down and pass it around, $i$}$s$o$w.\n"}say"$i$}$s$o$w, $i$}$s$o.";say"Go to the store and buy some more, 99$}s$s$o$w."

Using the free -M5.010 switch for "say" instead of "print".

Cheers.

deleted 446 characters in body
Source Link
LukStorms
  • 1.8k
  • 1
  • 12
  • 11
Loading
deleted 3 characters in body
Source Link
LukStorms
  • 1.8k
  • 1
  • 12
  • 11
Loading
added 543 characters in body
Source Link
LukStorms
  • 1.8k
  • 1
  • 12
  • 11
Loading
Source Link
LukStorms
  • 1.8k
  • 1
  • 12
  • 11
Loading