Re: Unknown level of hash

Alexandre Jousset <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Message-ID <[email protected]>
п║я┐я┘п╟п╫п╬п╡ п▓п╟п╢п╦п╪ wrote:
[snip code...]
> gives:
> 
> $VAR1 = {
>           'E1' => {
>                     'E2' => {
>                               'E3' => {
>                                         'En' => 1
>                                       }
>                             },
>                     'E3' => {
>                               'E1' => {
>                                         'Ex' => {
>                                                   'Ey' => {
>                                                             'Ez' => undef
>                                                           }
>                                                 }
>                                       }
>                             }
>                   }
>         };
> 

	Ok, but it should be possible to set the same hash, with another array 
sharing some starting elements and not destroy the previous hash. The 
result of my previous sample code should be :

$VAR1 = {
           'E1' => {
                     'E2' => {
                               'E3' => {
                                         'En' => 1
                                       }
                             },
                     'Ex' => {
                               'Ey' => {
                                         'Ez' => 1
                                       }
                             }
                   }
         };

	You can't do that with this method...
-- 
    \^/
  -/ O \----------------------------------------
| |/ \|       Alexandre (Midnite) Jousset      |
  -|___|----------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.