in reply to extract words from specific location

Why not use a for loop like so:

use warnings; use strict; my @alpha = qw(a b c d e f); my @location = qw(0 2 4); print $alpha[$_+1] for @location; # prints bdf
Update:
NOTE: Another thought, can the array with location be larger than the array that contains words to find?
If so, then the solution adds just a simple if statement.
my @alpha = qw(a b c d e f); my @location = qw(0 2 4 6 8 10 12); for (@location){ print $alpha[$_+1] if defined $alpha[$_+1]; }

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me