in reply to Memory Growth Problem

my $regex = qr/>([\S]*)\s*.*\s([A-Za-z\s]+)/; ... while( $fasta_sequence =~ m/$regex/igm ) {

Why are you putting the \S character class inside a character class?   Why use the /m option when you are not using either ^ or $ in the pattern?   Why use the /i option?

$sequence =~ tr/[\r|\n]//d; # delete all line breaks

Why are you also deleting the [, | and ] characters?

Replies are listed 'Best First'.
Re^2: Memory Growth Problem
by Robgunn (Initiate) on Nov 08, 2008 at 21:49 UTC
    Whoops, thanks for pointing that out.

    Update: Well, like others have pointed out, it was indeed a leak in the module I was using. I decided roll my own subroutine and my memory growth problems are solved. To my surprise I'm still hitting my Protein/second target! I'm back to loving Perl.

    Thanks for all the help!