in reply to enoeding iso 8859 issue within a datadump
to print to a file instead of printing at the screen, we just have to change:Well, that's ignoring the most important distinction between say and print: that say adds a newline at the end. And you can add a filehandle argument to say. So you'd better do:to:say $text;print $OUT_FILE $text;
If you setsay $OUT_FILE $text;
or even$OUT_FILE = \*STDOUT;
then you don't even have to swap code out code.$OUT_FILE = select;
As far as your problem concerns: look at Perl I/O Layers, in particular the :utf8 and :encoding layers.
|
---|
Replies are listed 'Best First'. | |
---|---|
A reply falls below the community's threshold of quality. You may see it by logging in. |
In Section
Seekers of Perl Wisdom