Okay: Encourged by your insistence, I finally found this bit in Camel 3, page 496: The -p loop also contains an implicit select(ARGVOUT); for each file. perlrun just says, "Note that the lines are printed automatically." It omits to say at that point "to the file in question". It's probably there somewhere. And it's clear once you know it. I just missed it.
All of which brings my to my tired question (revised a little each time). And I ask again because this part is still not clear. Assuming that the files are already backed up, does not this simple line: %perl -pie 's/old/new/g' ./*/* do everything I need without the use of find.... When I am doing things on unfamiliar turf, I like (if possible) to keep it simple and clear.
Update: Still reading... perlrun does contain the explanation of the implicit select(ARGVOUT);. But, as in Camel 3 (which simply reprints the whole section) it is under the -i, not -p. IMHO, the briefer code given under -p is misleading since it claims to explain what -p does but fails to mention the implicit 'select'. This is a crucial detail and the reason I deliberately chose not to use it at first. I had no need to print to STDOUT (which is what the code under -p, as given, would do).
In reply to Re(4): Need one-liner to s///g in all sub-dirs
by dvergin
in thread Need one-liner to s///g in all sub-dirs
by dvergin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |