$ cat test.in 12000 12678 5 49 50 499 500 501 ^D $ perl -lpe '$_=int(($_+50)/100)/10;$_.=".0"unless/\./'