in reply to Re: an ever-available file for opening
in thread an ever-available file for opening

A very, very good question. I need to test whether the :encoding(utf8) directive works and I feel that trying it out is more reliable than just checking the perl version.
use strict; use warnings; print "Just Another Perl Hacker\n";
  • Comment on Re^2: an ever-available file for opening

Replies are listed 'Best First'.
Re^3: an ever-available file for opening
by BrowserUk (Patriarch) on Jan 15, 2008 at 21:28 UTC

    Hm. I'm not sure that your justification stands up to scrutiny, but if you must, how about:

    my $utfData = "\x..."; open UTF, '<:encoding(utf8)', \$utfData or die 'Must be pre-5,8'; die 'Bad stuff happened' unless <UTF> eq 'Whatever you expect';

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.