while (<>) { chomp; # lose potential newlines at the end. (only needed for portability) print $_,"\n" if length $_ > 250; # print out any sequence longer than 250chars }