Skip to main content
comma before the until so that it also works on a recent version of perl 5
Source Link
LukStorms
  • 1.8k
  • 1
  • 12
  • 11

Perl 5, 158159

@c=(@b=(++$n,bottle.'s'x@-,of,beer),on,the,wall),s//Take one down and pass it around, @c.

@c, @b.
/,until/99\D+/;say$'."Go to the store and buy some more, $&"

Based on the solution from eyepopslikeamosquito found here.

Requires the free -M5.010 switch to use "say".*

Perl 5, 158

@c=(@b=(++$n,bottle.'s'x@-,of,beer),on,the,wall),s//Take one down and pass it around, @c.

@c, @b.
/until/99\D+/;say$'."Go to the store and buy some more, $&"

Based on the solution from eyepopslikeamosquito found here.

Requires the free -M5.010 switch to use "say".*

Perl 5, 159

@c=(@b=(++$n,bottle.'s'x@-,of,beer),on,the,wall),s//Take one down and pass it around, @c.

@c, @b.
/,until/99\D+/;say$'."Go to the store and buy some more, $&"

Based on the solution from eyepopslikeamosquito found here.

Requires the free -M5.010 switch to use "say".

edited body
Source Link
LukStorms
  • 1.8k
  • 1
  • 12
  • 11

Perl 5, 158

@c=(@b=(++$n,bottle.'s'x@-,of,beer),on,the,wall),s//Take one down and pass it around, @c.

@c, @b.
/until/99\D+/;say$_;say$'."Go to the store and buy some more, $&"

Based on the solution from eyepopslikeamosquito found here.

Requires the free -M5.010 switch to use "say".*

Perl 5, 158

@c=(@b=(++$n,bottle.'s'x@-,of,beer),on,the,wall),s//Take one down and pass it around, @c.

@c, @b.
/until/99\D+/;say$_."Go to the store and buy some more, $&"

Based on the solution from eyepopslikeamosquito found here.

Requires the free -M5.010 switch to use "say".*

Perl 5, 158

@c=(@b=(++$n,bottle.'s'x@-,of,beer),on,the,wall),s//Take one down and pass it around, @c.

@c, @b.
/until/99\D+/;say$'."Go to the store and buy some more, $&"

Based on the solution from eyepopslikeamosquito found here.

Requires the free -M5.010 switch to use "say".*

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

Perl 5, 158

@c=(@b=(++$n,bottle.'s'x@-,of,beer),on,the,wall),s//Take one down and pass it around, @c.

@c, @b.
/until/99\D+/;say$_."Go to the store and buy some more, $&"

Based on the solution from eyepopslikeamosquito found here.

Requires the free -M5.010 switch to use "say".*

Perl 5, 158

@c=(@b=(++$n,bottle.'s'x@-,of,beer),on,the,wall),s//Take one down and pass it around, @c.

@c, @b.
/until/99\D+/;say$_."Go to the store and buy some more, $&"

Based on the solution from eyepopslikeamosquito found here.

Perl 5, 158

@c=(@b=(++$n,bottle.'s'x@-,of,beer),on,the,wall),s//Take one down and pass it around, @c.

@c, @b.
/until/99\D+/;say$_."Go to the store and buy some more, $&"

Based on the solution from eyepopslikeamosquito found here.

Requires the free -M5.010 switch to use "say".*

added 16 characters in body
Source Link
LukStorms
  • 1.8k
  • 1
  • 12
  • 11
Loading
Source Link
LukStorms
  • 1.8k
  • 1
  • 12
  • 11
Loading
Post Made Community Wiki by LukStorms