in reply to tie:file get record number
for my $recNo ( 0 .. $#array ) { next unless $array[$recNo] =~ m{PERL}; my $changeCt = $array[$recNo] =~ s{PERL}{Perl}g; if ( $changeCt ) { print qq{$changeCt changes in record $recNo\n}; } else { warn qq{Failed to change record $recNo\n}; } }
I hope this is of use.
Cheers,
JohnGG
|
|---|