in reply to How to substitute 0 (zero) Instead of 'n/a'

Kind of a hack solution, but try running this script:
#!c:\perl\bin\perl.exe use strict; use warnings FATAL => 'all'; use Fcntl qw[:flock]; my $FH = 'C:\\scripts\\20040120\\mr\\imp\\'; chdir $FH or die "$!"; while (glob '*Jan2004*.txt') { open FH, $_ or die $!; flock FH, LOCK_SH or die $!; while (<FH> ) {s/n\/a//} close FH or die $!; } print 'replacing completed'
untested, but theoretically, that oughta work :)

Replies are listed 'Best First'.
Re: Re: How to substitute 0 (zero) Instead of 'n/a'
by arden (Curate) on Jan 22, 2004 at 18:53 UTC
    I don't think danield is wanting to replace the data in the files with zeros, just not allow the 'n/a's screw up his count. I could be wrong, in which case your solution works... :)