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


in reply to Print format not working

Tip #1 from the Basic debugging checklist: Use warnings and you will see warning messages. Change:

chomp($text_lines);
to:
chomp(@text_lines);

Also, chomp $column.

You should also use strict, in which case you'll need to declare each variable with my.