http://qs321.pair.com?node_id=968587


in reply to Re^2: "chomp" not working
in thread "chomp" not working

There is a carriage return at the end of each line. @arr1 before the chomp should like like above when printed out.
You are splitting on newlines. Why do you expect them to still be there?