[ABE.pm] My first enclosure doesn't work. :-(

Faber J. Fedor faber at linuxnj.com
Fri Oct 26 12:10:06 PDT 2007


On 26/10/07 14:05 -0400, Ted Fiedler wrote:
> Aside from doing the calculations - I would go with an approach something
> like this. Im in a meeting so I didn't have time to work the calculations
> in...
> 
> Ted
> 
> ___ Code Below ___
> 
> #!/usr/bin/perl
> use strict;
> use warnings;
> 
> sub make_if_elsif {
> #  This is the code we are trying to emulate with our enclosure
> my $capt = shift;
> 
> #personally I would use something like this, but thats neither here nor
> there :)
> #return qq
> #|( $capt < 100 )                          ? '3.0' :
> #( ($capt >= 100) and ($capt < 250) )     ? '1.5' :
> #( ($capt >= 10000) and ($capt < 50000) ) ? '0.01' :
> #'0.00'|;

I'll try it, but the main thing I need to do is to make the if-elsif
variable, both in $key and $value values as well as the number of
elsif's, e.g. no harcoding of the if-elsifs.


-- 
 
Regards,
 
Faber Fedor
President
Linux New Jersey, Inc.
908-320-0357
800-706-0701

http://www.linuxnj.com




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the ABE-pm mailing list