while (<>) { / (\d+) .*? to .*? (\d+) /x and print "$1\n$2\n"; }