Using string interpolation to reference two dimensional array element : interpolation « String « Perl






Using string interpolation to reference two dimensional array element

   

for $outerloop (0..4) {

    for $innerloop (0..4) {

        $array{"$outerloop,$innerloop"} = 1;

    }

}

   
    
    
  








Related examples in the same category

1.Using {} to separate variable in variable interpolation
2.Variable Interpolation
3.String interpolation
4.Interpolcation inside scalar variable