Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

clinton's scratchpad

by clinton (Priest)
on Nov 01, 2006 at 15:13 UTC ( #581685=scratchpad: print w/replies, xml ) Need Help??

#!/usr/bin/perl use strict; use warnings; my $m = shift @ARGV; chomp $m; my %func = ( '01' => sub { return $m / ( ( 10 + $_[0] )**0.1 ) }, '02' => sub { return $m / ( ( 10 + $_[0] )**0.2 ) }, '03' => sub { return $m / ( ( 10 + $_[0] )**0.3 ) }, '04' => sub { return $m / ( ( 10 + $_[0] )**0.4 ) }, '05' => sub { return $m / ( ( 10 + $_[0] )**0.5 ) }, '06' => sub { return $m / ( ( 10 + $_[0] )**0.6 ) }, '07' => sub { return $m / ( ( 10 + $_[0] )**0.7 ) }, '08' => sub { return $m / ( ( 10 + $_[0] )**0.8 ) }, '09' => sub { return $m / ( ( 10 + $_[0] )**0.9 ) }, ); for ( sort keys %func ) { print "$_:\n"; my $f = $func{$_}; for ( 10, 20, 50, 100, 200, 500, 1000, 2000, 5000 ) { my $v = int( $f->($_) ); printf "%-4d: %-150s %d\n", $_, '@' x $v, $v; } print "\n\n"; }
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[marto]: hey Corion, good weekend?
[Corion]: marto: Yeah, even though I didn't write any code :)
[Corion]: But at least I have a plan of action to move the site to https, played some (free!) VR games with friends and watched the plans for the next German Perl workshop progress ;)
[Corion]: AltSpace VR is amazingly good - highly polished and with some of the games you get for free what you'd pay EUR 20 or EUR 40 otherwise
[Corion]: But maybe it's also due to that I play with friends, which makes a game more enjoyable anyway ;)
[Corion]: Oh - I released a new version of some module, thanks to a pull request. But I don't consider "update Makefile.PL" and "update author tests" as "writing code" ;-D

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2017-08-21 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (319 votes). Check out past polls.

    Notices?