Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2014-12-28 10:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (180 votes), past polls