Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Golf Soccer Stats

by vladb (Vicar)
on May 23, 2002 at 17:20 UTC ( [id://168838]=note: print w/replies, xml ) Need Help??


in reply to Golf Soccer Stats

Nice challenge..

Here's my shameful attempt:
sub record { ($g,$p)=@_; $w=3;$t=1; $wT=int($p/$w); $tT=$p-($wT*$w); $lT=$g-($wT+$tT); ($wT,$lT,$tT); }
I didn't do much, just obfuscated it a bit here and there ;).

UPDATE: More Golf:
sub record { ($g,$p)=@_;$w=3;$t=1; $"=int($p/$w);$tT=$p-($" *$w);$;=$g-($"+$tT); ($",$;,$tT); }


UPDATE 1: Some more golf :)
sub record { ($g,$p)=@_; @_=($"=int($p/(@_+1)),$/=$p-$"*(@_+1),$g-$"-$/); (shift,pop,pop) }


_____________________
$"=q;grep;;$,=q"grep";for(`find . -name ".saves*~"`){s;$/;;;/(.*-(\d+) +-.*)$/; $_=["ps -e -o pid | "," $2 | "," -v "," "];`@$_`?{print"+ $1"}:{print" +- $1"}&&`rm $1`; print$\;}

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://168838]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-03-28 16:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found