"be consistent" | |
PerlMonks |
Re: Vector manipulation (scalar)by tye (Sage) |
on Jun 26, 2015 at 19:39 UTC ( [id://1132218]=note: print w/replies, xml ) | Need Help?? |
my $vect1 = $val1->[3..5];. When I print test here, I get: 2 Yep. 3..5 is being evaluated in scalar context because dereferencing to get a scalar wants a scalar index:
You probably want:
- tye
In Section
Seekers of Perl Wisdom
|
|