in reply to Re: Perl Golf 101
in thread Perl Golf 101
You know, the funny thing is that I know that, and that was one of the first changes I made in going from my full, fairly properly coded version to the golfed version. However, I specifically recall that there was at least one of my subs that refused to function correctly after the change. Was it from removing the explicit return, or some other change I made? I don't know, but I do know that restoring the return (and probably some other subtle changes) restored the functionality, so from that point on, dropping the explicit return was left out of my golf bag.
Update: Ok, it must've been some other subtle change that borked my golfed version, because without any other change, I removed all return's and it worked exactly as designed.
Then again, I don't recall making the claim of presenting anything beyond perl golf 101 :)
$,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Perl Golf 101
by sgt (Deacon) on May 30, 2006 at 22:17 UTC | |
by chargrill (Parson) on May 31, 2006 at 00:10 UTC |