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'; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: loop to allocate values to variables
by travisbickle34 (Beadle) on Aug 18, 2005 at 07:28 UTC |