Front page | perl.golf |
Postings from November 2007
Re: Just chipping in...
Thread Previous
|
Thread Next
From:
Juho Snellman
Date:
November 20, 2007 01:21
Subject:
Re: Just chipping in...
Message ID:
87zlx98q13.fsf@vasara.proghammer.com
Tuomo Salo <tuomo.salo@plenware.fi> writes:
> From the keyboard of Phil Carmody (2007-11-15 15:05):
> > I saw this on sci.math, and thought "one liner" ;-)
>
> While I could not squeeze this down to a one 80 char line, there is only
> one line that does not begin with a # :-)
>
> #!perl -l
> $\=~s#(.*)\n#"$1(\n"x($1=~y/(//<$a)."$1)\n"x($1=~y/)//*2<$_-1)
> #gefor 1..2*($a=pop);print
The following is technically speaking not a one-liner, but is 80 characters
total split to multiple lines:
#!perl
$_||=11x
pop;/1(1*)
?(1?)/?map$_&&do$0,$1!=$'&&"$`($1
1$2$'","$`)$1
$'"x$2:print
--
Juho Snellman
Thread Previous
|
Thread Next