I don't have too much practice in perl but I remember from my old days that you could get some elements of an array returned by a function in a single line, saving you time and code as not to save stuff first to a temporary array just to use a couple of their elements.
For instance
($a,$b,$c)=split(/:/, "stack:over:flow");
print "$b $c" # prints "over flow"
Or even
($a)=(split(/:/, "stack:over:flow"))[2];
print $a # prints "flow"
Let's say that I am only interested on the second and third elements ("over" and "flow") from the output of split
.
Can I do something like
($a,$b)=(split(/:/, "stack:over:flow"))[2,3];