in reply to Re: Info based on total changes
in thread Info based on total changes
while (<>) { chop; if ($_ =~/(.*)/) { $string = $1; $string =~ s/,000//g; $string =~ s/,//g; @numbers= $string =~ /(\d+)/g; $f= $numbers[0]; $s= $numbers[1]; $isf9 = substr($f,-3); if ($isf9 =~/999/) {$f=$f + 1;} $iss9 = substr($s,-3); if ($iss9 =~/999/) {$s=$s + 1;} $f =~ s/000//g; $s =~ s/000//g; #print join (" ",@numbers); if ($f>0 && $s>0){ $fac = (($s-$f)/2)+$f;} if ($f>0 && $s<1){ $fac = $f;} if ($fac>0) { $_ =~ s/^/($fac) /; $_ =~ s/$/;fac=$fac/; } } print "$_\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Info based on total changes
by ww (Archbishop) on Jun 21, 2012 at 13:07 UTC | |
by pqocpiha (Initiate) on Jun 21, 2012 at 17:23 UTC | |
by ww (Archbishop) on Jun 21, 2012 at 17:45 UTC | |
by Anonymous Monk on Jun 22, 2012 at 03:35 UTC |