We help IT Professionals succeed at work.
Get Started

What is wrong?  PERL search and replace

1,285 Views
Last Modified: 2012-07-05
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.
Comment
Watch Question
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 2 Answers and 12 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE