Hi I am want to add digits in In_digits together. Print total to screen. Could someone help?
Thanx
Bruce
In_digits:
1,200
2,400
#!/usr/bin/perl -w
open(INPUT, "In_digits") || die;
open(OUTPUT, ">Out_digits") || die;
while (<INPUT>) {
if (/(\d{1})(\,)(\d{3})/) {
print OUTPUT;
} else {
print "warning: line of unexpected format ($_)\n";
}
print
}
close(INPUT);
close(OUTPUT);
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
