use strict; my @rows; $rows[1] = 10; my $val = 1; my $row = $rows[$val]; print("$row\n");
If you're indexes are sparsed or strings, a hash would be more appropriate.
use strict; my %rows; $rows{1} = 10; my $val = 1; my $row = $rows{$val}; print("$row\n");
In reply to Re: Can't use string
by ikegami
in thread Can't use string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |