in reply to Replacing perl-5.8.x's filehandle "layers" in perl-5.6.x

When writing, :encoding only makes sense if you try to print "strings of chars". Perl 5.6 doesn't have string of chars, so there can be no parallel to :encoding.

To replace :encoding, you'd have to replace three things:

Basically, you need a "string of chars" class for Perl 5.6 to fill in for the native one in Perl 5.8. I don't know if such a thing exists. You really should upgrade to Perl 5.8 if you're going to deal with characters sets.

(And no, Encode won't help since it allows you to do explicitly what :encoding does implicitly. You can't convert "string of chars" if in a version of Perl where they don't exist.)

Replies are listed 'Best First'.
Re^2: Replacing perl-5.8.x's filehandle "layers" in perl-5.6.x
by shlomif (Beadle) on Jun 25, 2007 at 17:11 UTC

    I see. I guess we'll just default to ">", $file and don't worry about encodings at all for Perl 5.6.x and below. I'll need to consult the other maintainer about it, though.