in reply to Multi dimentions to a single dimentional array

There isn't really such a thing as a multi-dimensional array in Perl. You have what is called "array of arrays", which is short for "array of array references".

In this case, @ary contains three array references. You want something from each referenced array, so you need to visit each reference:

for my $month_data (@ary) { ... }

Now you need to extract the first element of the array referenced by $month_data:

$month_data->[0]

All together:

for my $month_data (@ary) { print $month_data->[0], "\n"; }