My script captures each sequence header as the key of a hash and captures the sequence itself as the hash. But the problem is that I want to name the files with only a part of the $id and not the whole of it i.e. hsa_circ_0000001. This is why I've split it like this:

Code

my $filename = (split /\|/, $id)[0];

But the thing is, when I try to integrate it into my loop wherein I create each new file, it claims that $filename is undefined. I am wondering how then I integrate it into the naming of the file