in reply to Re: gene location
in thread gene location

yes, you are right, I forgot to write them here, in my program they are, but anyway all that I can find in my output file is a lot of commas

Replies are listed 'Best First'.
Re^3: gene location
by Fletch (Bishop) on Jun 12, 2019 at 13:55 UTC

    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.

      Thank you :) it worked