in reply to Assigning the Length of an Array to a Variable

$#info gives the index of the last element of the @info array. See perldata

$info[$position] gives the array element at $position. Trying to combine those 2 results in a syntax error.

It might be a good idea to use different names for your info scalar variable and info array variable.

Maybe you want:

my $len = length $info[$position];