D
Dan Jacobson
Where do I hitch the <<EOF so I can plaster my input file right into
this source file? Yes, saw man perlop. Yes, I am prepared to give up
-anl if that's the price to pay.
#!/usr/bin/perl -anlw
#Input: each line consists of seconds per rotation of electric meter disk followed by
#a note of what appliances were on at the time.
#Output: total watts, appliance list. The Kh factor is written on the meter.
#Reference: http://www.earth.uni.edu/EECP/elem/mod2_math.html
BEGIN { $Kh = 7.2 };
unless (/^[^#]/) { next }
$p = 3600 * $Kh / $F[0];
shift @F;
print int($p), "\t@F";
this source file? Yes, saw man perlop. Yes, I am prepared to give up
-anl if that's the price to pay.
#!/usr/bin/perl -anlw
#Input: each line consists of seconds per rotation of electric meter disk followed by
#a note of what appliances were on at the time.
#Output: total watts, appliance list. The Kh factor is written on the meter.
#Reference: http://www.earth.uni.edu/EECP/elem/mod2_math.html
BEGIN { $Kh = 7.2 };
unless (/^[^#]/) { next }
$p = 3600 * $Kh / $F[0];
shift @F;
print int($p), "\t@F";