# I have a program that gets a hash from an API call. # the format of the hash is that each key corresponds to an # array. The following code snippet illustrates the data: $href->{One} = [1,2,3,4]; print ref($href)."\n"; print ref($href->{One})."\n"; # I would like to simplify the syntax to use a simple array # format by creating a new reference to the array to allow me # to use the conventional syntax ie: $aref[0] $aref = \@{$href->{One}}; print "$href->{One}=$aref\n"; # the output indicates that it did this... # but this next line does not give the expected results print "$href->{One}[0]=$aref[0]\n"; print "$href->{One}[0]=$aref->[0]\n"; #1. can I create a reference to this array that will allow me to # access it without the -> operator? #2. is there a simple explanation why I still need the -> operator?
#Howard Jares #University of Houston #Due to the current budget constraints, the light at the end of the tunnel will be turned off until further notice. _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs