in reply to Overwritten instance variables

You are (implicitly) using a global variable $self, which is the same for all calls to new(). If you use a lexical inside the new method, all should be fine:
use strict; use warnings; sub new { my $self = {}; my $class = shift; $self->{input_enc} = shift; unless (defined $self->{input_enc}) { $self->{input_enc} = "euc-jp"; } #... bless($self, $class); return $self; }

By using strict you are forced to declare your variables with my or our, making it more obvious how they are scoped. And it catches typos in variable names for you at compile time.