From: "John W. Krahn" <[EMAIL PROTECTED]> > Purshottam Chandak wrote: > > > > perl -ipe "s/yak/bak/g" `dir *.yak` is supposed to allow me to do a > > search and replace on all the .yak files in the directory in which I > > am working. It doesn't; I get all sorts of errors. I've tried > > modifications of said string- I've tried pipes, > > > > I've tried separating the command line parameters with individual > > dashes, I've tried turning the `dir *.yak` command into a bat file > > and calling it like: > > > > perl -i -p -e "s/yak/bak/g" `dir.bat` > > > > All to no avail. Does anyone understand these parameter things well > > enough to help me? > > > It looks like you are trying to do this on Windows. > > perl -pi -e"BEGIN{@ARGV=<*.yak>};s/yak/bak/g"
Apropos if I run this on Unix, what do I get ? perl -e 'print "BEGIN\nparam=";print(join("\nparam=", @ARGV));print "\nEND\n"' `ls` Do I get all the file names in $ARGV[0] or does it split the ls output? Why I ask .... I wrote a module that allows you to give Perl scripts the parameters under Windows (almost) like under Unix (support for single quotes, backticks, globing, etc. etc.). http://Jenda.Krynicky.cz/#G I don't have any Unix by hand so I'm not sure what's the expected behaviour in this case. Thanks, Jenda =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain. I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]