in reply to $1 and regex

it is quite clear that $1 qnd $2 are not displayed the same (since the regex are different...) but u might want to use :
while(<>){ print if m!(\d+)\D*to\D*(\d+)!i; print "$1\n"; print "$2\n"; }
i hope i got your question right ...

----
NaSe
:x