paragkalra has asked for the wisdom of the Perl Monks concerning the following question:

Hello All,

I have written a Perl script where I am extracting the columns from a excel sheet and printing the data of one of the column to a text file.

The script is doing its task but its show following warning message for the line number where I am printing the data to a text file.

Wide character in print at

What does it signify and how can I get rid of it.

--Parag

Replies are listed 'Best First'.
Re: Wide character in print at
by Anonymous Monk on Dec 07, 2009 at 08:50 UTC
Re: Wide character in print at
by ikegami (Patriarch) on Dec 07, 2009 at 18:22 UTC

    Files can only contain bytes, but you're printing something that's obviously not a byte.

    You need to convert the text to bytes ("encode" it), or tell Perl to do it for you.

    open(my $fh, '>:encoding(UTF-8)', $qfn) or die("Can't create output file \"$qfn\": $!\n"); print $fh $text;