Just as a note: using $a and $b as variables outside of the sort() function is generally a bad idea.
To answer your question, yes it is possible, but you don't need references for that:
my @x = ( 1, 2, undef ); $x[2] = $x[0] + $x[1]; print @x, "\n";
Or is that not what you are looking for?
In reply to Re: referencing list
by thomas895
in thread referencing list
by pmilne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |