Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6186661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:55:36+00:00 2026-05-24T01:55:36+00:00

In my previous question I asked about the problem with encoding and open pragma

  • 0

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 the open 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. ;(

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:55:38+00:00Added an answer on May 24, 2026 at 1:55 am

    You can use PerlIO::get_layers to detect layers assigned to a filehandle:

    use open qw(:std :utf8);
    open my $in, '<', 'somefile' or die "$!"
    my @layers = PerlIO::get_layers($in);      # ("unix", "crlf", "utf8")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a previous question, I asked about various ORM libraries. It turns out Kohana
In a previous question I asked about how to group XML elements logically, and
This stems from a previous question I asked - about a write conflict with
I asked a question about C-type sizes which I get a pretty good answer
In a previous question I asked about weaknesses in my own security layer concept...
I asked various questions about my problem ( here and here ) and I
I asked about pipes in a previous question, got that working perfectly. However I
In a previous question here I asked about drag n drop within the gridpanel.
In my previous question on this portal, I had asked about some insight about
this question is an extension to a previous question i asked (and was answered).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.