This is ok:
This isn't:use strict; use warnings; my @list; $list[0] = 0; $list[2] = 2; @list = sort {$a <=> $b} @list;
use strict; use warnings; my @list; $list[0] = [0]; $list[2] = [2]; @list = sort {$$a[0] <=> $$b[0]} @list;
In reply to Re^2: read-only error
by imp
in thread read-only error
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |