>> Is there any way to make a new variable, @something, that is just another >> name for the array that was passed in by reference? Since I'm building a >> complex data structure, having to include all those @{}'s can get annoying. > > Elements of a hash referenced by $h can be accessed by $h->{key}. Nested > structures can sometimes be simplified: $h->{key1}->[key2} is a two-level > nested hash, which can be simplified to $h->{key1}{key2}. The array-of-array > element ${${$a}[2]}[3] can be written as $a->[2]->[3], which can be > simplified to $a->[2][3], and so on.
This is great advice. I often end up with things like @{$a{$i}{$j}}[4,7,9], which can be a little painful both to write and to read, but I think this will help... Thanks, Jim. - Bryan -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/