Often at meetings you hear about people working at 98%, etc. The criteria used to assign these values is somewhat nebulous, and as you occasionally hear about values over 100%, it can't be very reasonable.

The algorithm is that you value an A at 1, B at 2, C at 3, etc. Just add up the characters and you get your value. The following script demonstrates this process in action, and running it is most enlightening about the ways of the world.

#! /usr/bin/perl use strict; # Demonstration of how much various things are worth... # A=1, B=2, C=3... my %chr2val; my $chr_value = 1; for ('A'..'Z') { $chr2val{lc($_)} = $chr2val{$_} = $chr_value++; } my $value = 0; # Illustrative examples if people haven't entered their own. @ARGV = ("HARD WORK", "KNOWLEDGE", "ATTITUDE", "BULLSHIT") unless @ARG +V; foreach my $word (@ARGV) { my $value = 0; foreach my $char ($word =~ /\w/g) { $value += $chr2val{$char}; } print "The value of '$word' is $value%.\n"; }

Replies are listed 'Best First'.
Re: So *THAT* explains meetings!
by CubicSpline (Friar) on Oct 13, 2001 at 05:00 UTC
    I'd better not let my wife know that PERLMONKS is 123% and MARRIAGE is 72%. I'll have to keep my priorities hidden. ;-)

    Honey if you're reading this, I already took out the kitty litter, I swear!

Re: So *THAT* explains meetings!
by Indomitus (Scribe) on Oct 13, 2001 at 01:53 UTC
    That's pretty funny. "The value of 'Indomitus' is 124%." I knew there was a reason I'm so tired after work. :)

    If you're going to copy/paste the code watch out for the V that got knocked down to the line below on the '@ARGV = ' line.