How to create multiple array variable in a loop

kalaid's Avatar
Light Poster
In php code to create multiple array variable using loop and assign value will be as below

for($i=0;$i<10;$i++)
{
$j=$i+1;
$arr$j[$i]="some value";
}
Above code will create array variable from arr1 to arr10 and assign value.

I want to convert same code to perl , how can i do this
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Code: Perl
for($i=0;$i<10;$i++)
{
  $j=$i+1;
  eval
  {
    \@arr$j[$i]="some value";
  };
}