in reply to Re: Decode stops working
in thread Decode stops working

my $enc = find_encoding("iso-8859-2")->name;

Why ->name?  It would return a string "iso-8859-2", instead of the object needed to be able to call methods like ->decode() upon.

use Encode; my $enc = find_encoding("iso-8859-2")->name; print $enc; # "iso-8859-2" $enc->decode("foo"); # Can't locate object method "decode" via packag +e "iso-8859-2"

Replies are listed 'Best First'.
Re^3: Decode stops working
by Khen1950fx (Canon) on Jun 26, 2010 at 22:24 UTC
    Good point. Thank you.