in reply to Multidimensional array

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

Replies are listed 'Best First'.
Re^2: Multidimensional array
by almut (Canon) on Dec 10, 2008 at 15:57 UTC
    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.

      TFT almut, the old saying about a day learning nothing is a day lost just came home to roost - that's another tool for my toolbox.

      It also underlines my sig, doncha think ?

      A user level that continues to overstate my experience :-))