in reply to loop to allocate values to variables

I can't imagine why you'd need to take the values in a hash and populate them to variable names -- you already have a hash! Why do you want to do this?

Instead of creating and using $blastresult, why can you not use $self->{_blastresult} wherever you need that value?

If you must, you could:

while (my ($k,$v) = each %$self) { $k =~ s/^_//; eval '$'.$k.'= $v'; }
<-radiant.matrix->
Larry Wall is Yoda: there is no try{} (ok, except in Perl6; way to ruin a joke, Larry! ;P)
The Code that can be seen is not the true Code
"In any sufficiently large group of people, most are idiots" - Kaa's Law

Replies are listed 'Best First'.
Re^2: loop to allocate values to variables
by travisbickle34 (Beadle) on Aug 18, 2005 at 07:28 UTC
    Hmmm. Having read these replies I honestly don't know why I didn't just opt to use the hash values :-/

    That's the route I'm going to take now though.

    Thanks for highlighting the insane nature of my question!