>>>>> "R" == Rick Klement <[EMAIL PROTECTED]> writes:
R> Since I'm going through "Golf withdrawal":
No kidding. As an alternative to cold turkey, I've wasted a little
time with the following...
Given Andrew's Post Mortem listings of everyone's solutions, print out
each unique solution sorted in ascending length. Assume the list is
normalized such that the she-bang line is #!perl, i.e. run the list
thru "perl -pe's/#!.*perl/#!perl/'" before dealing with it.
I have two variations one stroke different from each other.
perl\
-ne'/ \d+/?$c=!($a{$c}=$&):($c.=$_);END{print sort{$a{$b}<=>$a{$a}}keys%a}'
perl\
-ne'/^-/?$c=$a{$c}="":($c.=$_);END{print sort{length$b<=>length$a}keys%a}'
I'm sure there are smarter approaches that I don't see. Something with
the flip-flop maybe, but I'm not bright enough to use that beyond
"11..exit".
Hope you have a very nice day, :-)
Tim Ayers ([EMAIL PROTECTED])