in reply to Re^4: An overlapping regex capture
in thread An overlapping regex capture

Did you try printing the values of your variables as I suggested?


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^6: An overlapping regex capture
by Peter Keystrokes (Beadle) on Jun 22, 2017 at 18:17 UTC

    Yes, I tried it and got the following:

    ID: at seqextractor.pl line 23, <$fh> line 130.

    Segments: $VAR1 = [];

    From the using the following

    foreach my $id (keys %id2seq){ warn "ID: $id"; my @segments = split /\|/, $id; warn "Segments: " . Dumper \@segments; my $filename = $segments[0]; }

    Does it mean that the array is empty?

      Yes, that's right. And can you also see why the array is empty, from your debug statements?


      The way forward always starts with a minimal test.