use strict; use warnings; while () { chomp; print ">$_<\n"; } __DATA__ test data that chomps fine. Your manky data that fails for a chomp A nicely chomped line #### >test data that chomps fine.< >Your manky data that fails for a chomp< >A nicely chomped line<