in reply to One-liner search and replace with multiple files...on Windows.

On Windows, *.txt isn't expanded by the shell as in Linux. But Perl can expand it itself: just use glob.
perl -pi.bak -e "BEGIN { @ARGV = map glob, @ARGV } s/cheese/soup/g" *. +txt

Don't use filenames containing spaces or wildcard characters with this, though.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: One-liner search and replace with multiple files...on Windows.
by afoken (Chancellor) on Dec 04, 2016 at 09:27 UTC
    On Windows, *.txt isn't expanded by the shell as in Linux. But Perl can expand it itself: just use glob.

    There is a module for that: Win32::Autoglob. With a minor patch, it would also work on the nearly-dead other Microsoft operating systems MS-DOS and OS/2 (see Re^3: Perl Rename).

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)