Ah, derp. I blame the bad formatting for missing that. Yeah, that's it.
At any rate that's because your regex isn't capturing anything so $1 and $2 don't have anything in them. Again, known format don't reinvent wheels you don't have to; but for something quick and dirty . . .
if( my( $start, $stop ) = $line =~ m{ < (\d+) \.\. > (\d+) }x ) {
$n++;
print OUT qq{$start, $stop, $header\n};
}
The cake is a lie.
The cake is a lie.
The cake is a lie.
|