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 :-))