jepri has asked for the wisdom of the Perl Monks concerning the following question:
#This bit works foreach (@{$row_data{groups}}){ push @{$new_row_data{groups}}, $_ if $ +{$_}{whatever}==$something_else; foreach (@{$row_data{fields}}){ push @{$new_row_data{fields}}, $_ if $ +{$_}{whatever}==$something_else; #This bit doesn't at all $row_data{groups}=$new_row_data{groups}; $row_data{fields}=$new_row_data{fields};
There are other hash keys in row_data that I wish to keep. I could just copy them over to %new_row_data one by one, but in the spirit of knowing what's going on, could someone show me the correct way to do it. I wanted to use map originally, but I couldn't quite get that going right either.
____________________
Jeremy
I didn't believe in evil until I dated it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Wrestling with HoL
by jeroenes (Priest) on May 16, 2001 at 14:06 UTC |