in reply to Re^3: Word Replacing
in thread Word Replacing

You may have to forgo the single-line command, and do something akin to this (which is not tested)

use strict; use warnings; my $newfolder = shift(@ARGV); use Tie::File; use Fcntl 'O_RDWR'; chdir($newfolder); my @list=glob("*"); foreach my $file (@list){ tie @array, 'Tie::File', $file, mode => O_RDWR or die "could not tie $ +file because...$!\n" foreach my $record (@array) { $record =~ s/$oldword/$newword/ig; } }

Read docs on Tie::File; it will probably help.

Also, read up on glob.

emc

Any New York City or Connecticut area jobs? I'm currently unemployed.

There are some enterprises in which a careful disorderliness is the true method.

—Herman Melville