in reply to Tricky syntax with hash ref. slicing
The %s are unnecessary, so you can wipe one level of dereferencing there.
@{ $rhPublicHandles }{ @publicHandles } = @{ $rhHandles->{handles} }{ @publicHandles };
If you're worried about verbosity, you could stick $rhHandles->{handles} into a temporary scalar; however if this is the one and only place you're referring to it in this particular scope it's probably overkill (whereas if you're using it several times it might make things a little cleaner).
Update: maybe play with the formatting and make things line up?
@{ $rhPublicHandles }{ @publicHandles } = @{ $rhHandles->{handles} }{ @publicHandles };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tricky syntax with hash ref. slicing
by johngg (Canon) on Mar 10, 2006 at 16:29 UTC |