cboesch has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
When I print a variable to STDOUT:
printf "%s.\n", $var;
I get:
QeTEv2804.
When I print the same varible to a file:
open DEBUG, ">>debug.txt" or confess "Couldn't open file";
printf DEBUG "%s.\n", $var;
close DEBUG;
I get:
QeTEv2804^@^@^@.
What could be the reason for that?
Thanks,
Christian
When I print a variable to STDOUT:
printf "%s.\n", $var;
I get:
QeTEv2804.
When I print the same varible to a file:
open DEBUG, ">>debug.txt" or confess "Couldn't open file";
printf DEBUG "%s.\n", $var;
close DEBUG;
I get:
QeTEv2804^@^@^@.
What could be the reason for that?
Thanks,
Christian
Back to
Seekers of Perl Wisdom