in reply to Aliasing values, not variables

Lexical::Alias is not suited for this task. Try Array::RefElem instead:

use Array::RefElem 'av_store'; my @array; av_store @array, 1, $array[0]; $array[1] = 2; print "@array";

If you're bent on using Lexical::Alias, you can try the following trick for your particular situation, though it's of little use for generic array element aliasing. It's an answer to the first question from How's your Perl?, adapted to Lexical::Alias.

use Lexical::Alias 'alias_a'; my @array; { my $t; alias_a @{sub {\@_}->($t, $t)}, @array; }

Warning: code untested!. I don't have my laptop which has my custom Perl install with Lexical::Alias and Array::RefElem. Particularly the second example might not work as advertised.

update: a monk confirms that code works on CB