TTA Perl Golf 3

Comments and discussion for articles on the site. To start a new thread, click "Post comment" from an article.

Moderators: Philippe, Tyler, Tony, Johnson

TTA Perl Golf 3

Postby Posting Bot on Mon Oct 30, 2006 10:29 pm

Tyler wrote:

Golf 3...another chance for Mostleet to embarass me.

Full article: http://www.teamtotallyawesome.com/op_ed/301
User avatar
Posting Bot
Autonomous Process
 
Posts: 56
Joined: Mon Dec 27, 2004 3:57 pm
Location: Somerville, MA

Postby mostL33T on Mon Oct 30, 2006 10:39 pm

193 characters, by the deadline even.

-n sub k{my($s,@d)=@_;if(@d){for(my$i=0;$i<=$#d;++$i){k($s.$d[$i],(@d[0..$i-1], @d[$i+1..$#d]))}}else{$c{$s}=1}}s/[^A-Za-z]//g;s/(.)/$1 /g;@b=split(/ /,$_);k("",@b);foreach(keys %c){print$_,$/}
User avatar
mostL33T
Registered User
 
Posts: 29
Joined: Wed Jan 14, 2004 4:03 am
Location: Maynard, MA

Postby Tyler on Tue Oct 31, 2006 3:41 pm

mostL33T wrote:
foreach(keys %c){print$_,$/}

print$_,$/for keys%c
Oh, I just wanted to see if I could run my own web server. It ain't some big deal like the main nerds would have you believe. This crud is fly-easy if you can make yourself care. - Ray Smuckles
User avatar
Tyler
Founding Member, Chief Morale Officer
 
Posts: 987
Joined: Thu Oct 30, 2003 1:33 pm
Location: in ur base cappin ur flag

Postby mostL33T on Tue Oct 31, 2006 10:53 pm

174 characters sparked by Ty's observation.

-n sub k{my($s,@d)=@_;if(@d){for(my$i=0;$i<=$#d;++$i){k($s.$d[$i],@d[0..$i-1],@d[$i+1..$#d])}}else{$c{$s}=1}}s/[^A-Za-z]//g;s/(.)/$1 /g;@b=split;k("",@b);print$_,$/for keys%c
User avatar
mostL33T
Registered User
 
Posts: 29
Joined: Wed Jan 14, 2004 4:03 am
Location: Maynard, MA

Postby Tyler on Wed Nov 01, 2006 1:48 pm

108
-n s/[^a-z]//ig;@_=sort split//;$"=',';@f{glob"{@_}"x@_}=1;map{@w=sort split//;print$_,$/if"@w"eq"@_"}keys%f
Oh, I just wanted to see if I could run my own web server. It ain't some big deal like the main nerds would have you believe. This crud is fly-easy if you can make yourself care. - Ray Smuckles
User avatar
Tyler
Founding Member, Chief Morale Officer
 
Posts: 987
Joined: Thu Oct 30, 2003 1:33 pm
Location: in ur base cappin ur flag


Return to Article Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron