in reply to Multi dimensional arrays
You need to access the proper element and dereference it.
use strict; use warnings; my @array = ("w", "h", [1, 2, "c"]); print $array[0],$/; # w print $array[1],$/; # h print $array[2],$/; # ARRAY(0x177f07c) You've found the array referenc +e! print ${$array[2]}[0],$/; # 1 print ${$array[2]}[1],$/; # 2 print ${$array[2]}[2],$/; # c
See tye's References quick reference for more details!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Multi dimensional arrays
by Hofmator (Curate) on Feb 08, 2003 at 11:28 UTC | |
by Mr. Muskrat (Canon) on Feb 10, 2003 at 14:00 UTC | |
by Hofmator (Curate) on Feb 10, 2003 at 14:54 UTC |