troubleshooting Question

What is wrong? PERL search and replace

Avatar of hongning2009
hongning2009 asked on
PerlScripting LanguagesMicrosoft Legacy OS
12 Comments2 Solutions1286 ViewsLast Modified:
I am new in PERL and testing the following command in windows Strawberry

perl.exe -pi.bak -e "BEGIN{@ARGV=<*.fdf>} s/FP944/F951/g"

There is only one file that has extension fdf and I receive this error

The filename, directory name, or volume label syntax is incorrect.

The command above supposedly work in windows, anyway I tested this command also

perl -pi.bak -e "s/FP944/FP951/g" *.fdf

and I get the following error
Unrecognized character \x93; marked by <-- HERE after <-- HERE near column 1 at -e line 1.


What I want accomplish is to replace a string  FP944 with FP955 and do it from that directory and continuing to the subdirectories.

Any help would be great.
ASKER CERTIFIED SOLUTION
wilcoxon

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros