I think I had given less information, Please check the complete proble.
consider
/root/abc.pl containing
##########
and I am executing rep.pl containing
$ser="##########";
$domain ="newdomain";
$extension="com";
$x = "<VirtualHost
www.$domain.$extension>\n\tServerAdmin admin@$domain.$extension\n\tDocumentRoot \/home1\/$domain\/html\n\tServerName
www.$domain.$extension\n\tErrorLog logs\/www.$domain.$extension-error_log\n\tCustomLog logs\/www.$domain.$extension-access_log common\n<\/VirtualHost>"
$result=`perl -i -p -e 's/$ser/$x/g;',/root/abc.pl`;
I am getting a error which says something like this
---------------------------------------------------
"Bareword found where operator expected at -e line ..., near "DocumentRoot"....
(Might be a runaway multi-line // string on line 1)
(Do you need to predeclare DocumentRoot?)
Can any on esove this problem?
Regards,
Ramesh. P. S