tphyahoo has asked for the wisdom of the Perl Monks concerning the following question:
First question is, can I get this working a slick one liner from dos (mainly for perl missionizing around the office :) ). Second is, if there's a way to do this without a backup file?
The usual tactic for inplace many files is the "perl dash pie" trick, perl -p -i -e "s/change this/to this/g" *, but this appears to be only for nix. I haven't been able to get * to work as "all files" from the dos command line. Is there a way to get this to work as a one-liner from dos?
Abandoning the one liner idea for the time being, I found two very helpful merlyn posts at My pattern for "in-place edit" for many files and Shell trick to edit many files with perl (in reply to another post). Like the perl pie trick though, these leave backup files.
Any way to adopt the above scripts without leaving those .bak breadcrumbs?
|
|---|