You can see what I'm trying to do, can't you? I want to assign an array to a slice of a refernced hash. But I'm damned if I can get the syntax right. I've tried changing quote mthods and diddling with curlies, ->s, $s and and @s until I'm blue in the face, but have had no luck. May I crave the monks' solicitude for my redemption?$ perl -MData::Dumper=Dumper -lwe '$p={}; $p->{qw(fee fie foe)} = (1.. +3); print Dumper $p' $VAR1 = { 'feefiefoe' => '' }; $ perl -MData::Dumper=Dumper -lwe '$p={}; @p->{qw(fee fie foe)} = ( 1..3); print Dumper $p' Can't coerce array into hash at -e line 1.
In reply to Syntax for slice of a referenced hash by domo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |