in reply to Re^3: An overlapping regex capture
in thread An overlapping regex capture
Okay, so I tried to implement that as so:
But I got an error saying that $filename was uninitialized at the 3rd line down --- open my $out_fh, '>>', "$filename.fa" or die $!;foreach $id (keys %id2seq){ my $filename = (split /\|/, $id)[0]; open my $out_fh, '>>', "$filename.fa" or die $!; print $out_fh (">".$id."\n",$id2seq{$id}, "\n"); close $out_fh; }
So I'm just trying to figure out where I should be declaring $filename
Pete.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: An overlapping regex capture
by 1nickt (Canon) on Jun 21, 2017 at 22:11 UTC | |
Re^5: An overlapping regex capture
by hexcoder (Curate) on Jun 22, 2017 at 11:22 UTC | |
by haukex (Archbishop) on Jun 22, 2017 at 12:40 UTC |