In my previous question I asked about the problem with encoding and open pragma
. Based on @daxim's answer coming to my mind another questions.
use open qw(:std :utf8);
- It is a good practice using the above
open pragma
? Asking because I cannot ensure than some CPAN packages does not want do some IO - and theopen pragma
will interfere with them.
sub-questions:
- Is possible somewhat detect, what pragma is in effect for the given stream? For example: is possible somewhat detect than STDOUT is opened with the
open(:std :utf8)
pragma? - more broadly, is possible detect what conversions/(or encoding) is applied for any (already opened) file-handle? (if so, it is possible to ensure not getting double encoding.)
Ps: I learned much from the tchrit's famous answer, but seem not enough yet. ;(