in reply to Character Counts
Now my problem is adding/updating a counter for the output.#--------Clean Phone Number $newphone = $phone $newphone = =~ s/[^0-9]//g; #-----Length of cleaned Number $phonelength = length($newphone) #-----Update Counter and Print Output if (length($newphone) != 4 and length($newphone) != 10) { # add asterisks $emph = "****" } else { $emph = "" # print number Print PHONELIST, sprintf "%16d %100s", $phone[1], $abs_filename[2], + "\n"; Print SUMMARY, sprintf "%16d %12d %4s %100s", %ctr++; $phone, $newphone[1], $emph[2], $phonelength[3], $abs_filename[4] "\n"; }
Added code tags and indents - dvergin 2003-04-07
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Character Counts
by graff (Chancellor) on Apr 07, 2003 at 22:24 UTC |