in reply to How to substitute 0 (zero) Instead of 'n/a'
untested, but theoretically, that oughta work :)#!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'
|
|---|
| 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 |