The array @Mdevices is constructed as an array of array refs, so you should de-reference using e.g. print $Mdevices[$k]->[0],"\n"; - something that the use of strictures would have pointed out for you.
A user level that continues to overstate my experience :-))
you should de-reference using e.g. print $Mdevices[$k]->[0]
$Mdevices[$k]->[0] is functionally the same as $Mdevices[$k][0] (what the OP had).
You only need the arrow if it's at the 'first' level (i.e.
$Mdevices->[0] is not the same as $Mdevices[0] —
here, the parser needs some way to disambiguate). In case it isn't
ambiguous (between brackets/braces), the arrow is optional.