Re: Dynamic Hash Naming and multi-dimensional hashes

2003-02-25 Thread R. Joseph Newton
Hendricks Paul D A1C 27 IS/INYS wrote: > Hello beginners! > > Where do I start... I've already done some reading on this and I've played > tag the wall with the forehead long enough. > What I'm challenging myself to do is to create: >a) a way to name a hash from user input Don't. If you re

Re: Dynamic Hash Naming and multi-dimensional hashes

2003-02-25 Thread Peter_Farrar
>I've played >tag the wall with the forehead long enough. > a) a way to name a hash from user input If you mean assign a value with in a hash using the user input, then: my %hash $key = ; $val = ; $hash{$key} = $val; If you really want to let the user name your var

Re: Dynamic Hash Naming and multi-dimensional hashes

2003-02-25 Thread Lance
if you are just trying to access a set of nested arrays, use something like my @parent=([1,2,3], [7,8,9]); print "$parent[0][1]\n";# outputs 2 print "$parent[1][2]\n";# outputs 9 ## now to access the the info, use references foreach my $num(@parent){ foreach my

RE: Dynamic Hash Naming and multi-dimensional hashes

2003-02-25 Thread Bob Showalter
Hendricks Paul D A1C 27 IS/INYS wrote: > Hello beginners! > > Where do I start... I've already done some reading on this and I've > played tag the wall with the forehead long enough. Are you working through a book, like Learning Perl? If not, you should, because it takes you step by step through