I want to do an array with 2 dimension in perl and I saw that the ease way to do it was with array of hash. there is my array of hash
my %tstat;
while ( $index <= $i ) {
$curfile[$index] = $camera_path[$index] . "/current.jpg";
$tstat{$index} = stat( $curfile[$index] );
$index++;
}
$index = 0;
while ( $index <= $i ) {
if ( $tstat{$index}[9] != $last_direct_img[$index] || $buffer_init-- > 0 ) {
...;
$index++;
}
}
And it tells me
Can't use string ("1") as an ARRAY ref while "strict refs"
I have try to change [9] with {9} but it's the same, why?