From: Jean-Sébastien Guay [mailto:[EMAIL PROTECTED]
perl -p -i -e 's/username\/password as SYSOPER/username\/##### as
SYSOPER/g'
test.dat
Can't find string terminator "'" anywhere before EOF at -e line 1. is the error I am getting
On Windows the single quote is not a valid quoting character for the shell (cmd.exe or command.com). Replace the single quote with a double quote and it should work fine.
perl -p -i -e "s/username\/password as SYSOPER/username\/##### as SYSOPER/g" test.dat
The problem happens when your Perl code contains quotes as well, but that's another topic... :-)
I am getting the following error. Do you have any idea?
Can't do inplace edit without backup.
Yes, Windows won't allow you to use the inplace edit switch without supplying a string. Just add a string of some sort to the -i switch, for example:
perl -p -i.bak -e "s/username\/password as SYSOPER/username\/##### as SYSOPER/g" test.dat
John -- use Perl; program fulfillment
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>