[email protected] wrote:
Hi, I have a line read in perl from a file that itself is a source code for languages like c/sv etc. The variable containing this line contains special characters like %d. When i print this line to another file, the %d is evaluated and a 0 is getting printed. How do i overcome this and tell perl to strictly not interpolate/evaluate any contents of this variable and simply print it as is ! ~Pushkaropen RFH "< File1.txt"; open WFH "> File2.txt"; while ($line = <RFH>) { chop($line); printf WFH "$line\n";
--------^^^^^^ Use print(), not printf(). -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
