in reply to Re: How to perform single operation to each line in file
in thread How to perform single operation to each line in file

You rightly removed the line returns with chomp, you need to add them back when you print:
print $char_a, "\n"; print $char_b, "\n";
Additional comments: why do you have use strict and use warnings twice (actually three times since you are also using modern Perl)? Why did you change from a lexical filehandle ($FH) to a bare word filehandler (FH)?