Re: simple golf for fun

"Yanick Champoux" <[email protected]> Tue, 16 Jan 2007 12:44:02 -0500 (EST)
Newsgroups gmane.comp.lang.perl.golf
Message-ID <[email protected]>
Phil Carmody said:
> This is a real world task which can be solved in a couple of lines.
> Which makes me think that you guys can do it in about half a line!

   Not exactly half a line, but still not too bad:

#!perl -lp
$p=~s/\B|\b/(.)?/g;/^$p$/;
$p=$_;$_=(@m=grep/./,@-)==2?pop@m:die"broken sequence";


Joy,
`/anick