Reading expression problem

I want to read a file -line by line which consists of the following statements
Chr18:4000-4010
Chr20:4020-4030
Chr15:8000-8050

Pls. give a expression to read the line like this from a file

Chr18:4000-4010

the given two replies reading like that

Chr18:-10

but it is important to read like Chr18:40000-400010 from a file

Pls. help me

because it is important to run a tool in computational biology

pls. help me to correct this.

$ ruby -F"[:-]" -ane 'print "#{$F[0]}:#{$F[1].to_i - $F[2].to_i}\n"' file
Chr18:-10
Chr20:-10
Chr15:-50

$ 
$ 
$ cat f23
Chr18:4000-4010
Chr20:4020-4030
Chr15:8000-8050
$ 
$ awk -F[:-] '{print $1":"$2-$3}' f23
Chr18:-10
Chr20:-10
Chr15:-50
$ 
$ perl -F[:-] -lane 'print "$F[0]:",$F[1]-$F[2]' f23
Chr18:-10
Chr20:-10
Chr15:-50
$ 
$ 

tyler_durden