MARG wrote: > Hi, > > I'm trying to subst the string: > # Include conf/extra/httpd-ssl.conf > > for > Include conf/extra/httpd-ssl.conf > > with the command: > perl -pi~ -e 's/# Include conf/extra/httpd-ssl.conf/Include > conf/extra/httpd-ssl.conf/' /usr/local/httpd/conf/httpd.conf > > but i get an error. > > I've used this before with success. > > Is it because of the white space between "Include" and "conf" ? >
No, it is because the search string contains the same delimiter as the expression is using, aka the '/'. You need to either escape the / characters or change your delimiter, perl -pi~ -e 's{# Include conf/extra/httpd-ssl.conf}{Include > conf/extra/httpd-ssl.conf}' /usr/local/httpd/conf/httpd.conf For instance, http://danconia.org > Any help would be apreciated. > > Warm Regards, > MARG > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>