On 10-08-17 07:59 AM, Irfan Sayed wrote:
Hi All,

I need to print some string into the file.
the string is like this : "<?xml version="1.0" encoding="UTF-8"?>"

i have written code like this :
print MYFILE "<?xml version="1.0" encoding="UTF-8"?>\n" where MYFILE is a file
handler.

if i run this code , it is giving so many syntax errors.
any advice please

Regards
Irfan




Use a backslash to escape the internal double quotes:

print MYFILE "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";


--
Just my 0.00000002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

The secret to great software:  Fail early & often.

Eliminate software piracy:  use only FLOSS.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to