in reply to Extracting a slice from an array ref

*grins* It's actually quite simple. It has to do with what you're operating on. A dereference, using ->, is expecting an array-reference, which is a scalar. Hence, the $r. A slicing expects an array, which is a list. Hence, the @$r.

Incidentally, if you wanted to take a slice of a hash-ref, as slicing demands an array, you would have to do the following: @list = @{$href}{qw(key1 key2 key3)};

------
/me wants to be the brightest bulb in the chandelier!

Vote paco for President!