while (<>) { chomp; substr($_, 24, 0, ' ') if length() > 24; print("$_\n"); }