in reply to Re: Word Replacing
in thread Word Replacing

hmmm .. ok .. but if i want that it will search, check and replace all words in all files in a folder? look, i have for example about 1000 TXT files, and there is a word Bartholome and i need to replace it for Richard - In ALL files in this folder ... Yes i know .. I do perl mostly for fun, but i need it now .. :(

Replies are listed 'Best First'.
Re^3: Word Replacing
by blue_cowdawg (Monsignor) on May 31, 2007 at 13:34 UTC
        look, i have for example about 1000 TXT files, and there is a word Bartholome and i need to replace it for Richard

    Similar to what was already pointed out to you:

    perl -spi -e 's/Bartholome/Richard/g' /path/to/folder/*


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
Re^3: Word Replacing
by blazar (Canon) on May 31, 2007 at 13:32 UTC
    hmmm .. ok .. but if i want that it will search, check and replace all words in all files in a folder?

    Use glob or File::Find (if you want to do that recursively) or one of its friendlier relatives.