http://www.perlmonks.org?node_id=65350


in reply to help with (what I consider) a strange problem

perldoc -f chomp should tell you that chomp returns the total number of characters chomped from its arguments. So in essense, you're trying to piglatinize "1". Try changing $latin->charge($_) to $latin->charge($line).

As an aside, you shouldn't assign to $_. You can do Bad Things(tm) like that if you're not careful.