Perl: select elements of array using array of integers : Is it possible to select specifics elements of an array using an array of integers(indexes). I know that this can be done easily with a loop but was hoping for a one line solution.  

Example/attempts  

@arr = qw(a b c d e f);  
@arr2 = qw( 0 2 4);  

Rather than  
@arr3 = @arr[0,2,4];  

use @arr2 as set of integers that you wan't selected  
@arr3 = @arr[@arr2]; #won't work as "@arr2" returns number of elements  
@arr3 = @arr[join(','@arr2)] #won't work as join returns a string  

