Re: Adding the input file digits together (Come on guys)

2002-03-18 Thread zentara
On Sat, 16 Mar 2002 19:17:25 +0200, [EMAIL PROTECTED] (Bruce Ambraal) wrote: >I am want to add digits in In_digits together. >Print total to screen. >Could someone help? >In_digits: >1,200 >2,400 > >#!/usr/bin/perl -w >open(INPUT, "In_digits") || die; >open(OUTPUT, ">Out_digits") || die; >while

Adding the input file digits together (Come on guys)

2002-03-17 Thread Bruce Ambraal
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 () { if (/(\d{1})(\,)(\d{3})/) { print OUT

Adding the input file digits together

2002-03-17 Thread Bruce Ambraal
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 () { if (/(\d{1})(\,)(\d{3})/) { print OUT