NetWallah has asked for the wisdom of the Perl Monks concerning the following question:
and thought - surely there is a better way, but could not figure out a functioning lazier syntax, either via a map, or variants of :($self->{ uno },$self->{ dos }, $self->{ tres }) = qw|some three va +lues|;
Which would seem reasonable.# does not work @{$self->{qw|uno dos tres|}} = qw|some three values|;
Is there such an animal as a hashref-slice ? as an LVALUE ?
If not, can this be done using map ? (LVALUE map ?)
What would Perl6 do ?
..to maintain is to slowly feel your soul, sanity and sentience ebb away as you become one with the Evil.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hashref slice syntax ?
by wfsp (Abbot) on Feb 11, 2009 at 07:18 UTC | |
|
Re: hashref slice syntax ?
by moritz (Cardinal) on Feb 11, 2009 at 07:21 UTC | |
|
Re: hashref slice syntax ?
by jwkrahn (Abbot) on Feb 11, 2009 at 07:19 UTC | |
|
Re: hashref slice syntax ?
by NetWallah (Canon) on Feb 11, 2009 at 22:22 UTC |