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

First, follow the advice given. Go through your script and correct *all* the items Discipulus pointed out. Second, when in doubt, print out the value of your variables.

use Data::Dumper; ... foreach my $id (keys %id2seq) { warn "ID: $id"; my @segments = split /\|/, $id; warn "Segments: " . Dumper \@segments; my $filename = $segments[0]; ... }
Once the code is working right, remove the debug statements.


The way forward always starts with a minimal test.