develooper Front page | perl.beginners | Postings from February 2009

Re: Unmatched '

Thread Previous
John W. Krahn
February 23, 2009 15:49
Re: Unmatched '
Message ID:
John W. Krahn wrote:
> Karyn wrote:
>> Can someone else see why I am getting the following error, cause as 
>> far as I can tell I have escaped all the ' single quotes.
>> ganymede# perl -i.bak1 -p -e 
>> 's/include(\'http:\/\/\/redcat\/nav.php\')\;/include(\'nav.php\')\;/ig' 
>> *.php
>> Unmatched '.
>> ganymede# perl -v
>> This is perl, v5.8.8 built for i386-freebsd-64int
> As you can see, escaping them won't work, but this should:
> perl -i.bak1 
> -pe's,include(\047\047);,include(\047nav.php\047);,ig' 
> *.php

Oops, that *should* be:

perl -i.bak1 

Those people who think they know everything are a great
annoyance to those of us who do.        -- Isaac Asimov

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About