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

Re: Unmatched '

Thread Previous | Thread Next
From:
John W. Krahn
Date:
February 23, 2009 15:35
Subject:
Re: Unmatched '
Message ID:
49A332B6.9070008@shaw.ca
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:\/\/calarts.edu\/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(\047http://calarts.edu/redcat/nav.php\047);,include(\047nav.php\047);,ig' 
*.php




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

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About