cat test.bed12 | perl -p -e 'chomp;@v=split(/\t/);if ($v[4] > 1000){$v[4] = 1000;}$line=join("\t",@v);$_="$line\n";'