50545 4.393864E+00 .0 50546 9.589456E+00 .0
50547 2.690474E+00 .0 50548 -1.668896E+01 .0
50549 -3.391918E+01 .0 50550 -3.634581E+01 .0
50551 -3.176630E+01 .0 50552 -1.747830E+01 .0
50553 -5.256684E-01 .0 50554 1.135265E+01 .0
I am trying to match between two integers. For example In the first line I tried to match anything between 50545 and 50546 and after 50546. In the first line I want to match
" 4.393864E+00 .0" and stote it in "$1" and match
" 9.589456E+00 .0" and store it in "$2". Do the same for the other lines. My code was:
if($in =~ m/^\s+\d+\s+(.*)\d+\s+(.*)$/){
print FH ("$1\n");
print FH ("$2\n");
}
This code did not work. Can you help me?