another exercise

#tree dimensional hash
my @array=();
print "nr of elements in [EMAIL PROTECTED]".($#array+1)."\n";
my %hash3=(accno=>'0123',description=>'test0');
push @array,\%hash3;
print "nr of elements in [EMAIL PROTECTED]".($#array+1)."\n";
print "value of key accno of hash at array\[0\]=".$array[0]->{accno}."\n";

my %hash2=(aa=>'aaa',bb=>'bbb',cc=>[EMAIL PROTECTED]);
my $hash2_ref=\%hash2;
print "\$hash2_ref\-\>\{aa\}=$hash2_ref->{aa}\n";
my %hash1=(a=>\%hash2,b=>\%hash2,c=>\%hash2);
my $hash1_ref=\%hash1;
print "\$hash1_ref\-\>\{a\}\{cc\}=$hash1_ref->{a}{cc}\n";

print "value of key description of hash at
array\[0\]="[EMAIL PROTECTED]>{a}{cc}}[0]}{description}."\n";
push @{$hash1_ref->{a}{cc}},{accno =>'4567',description=>'test1'};
@[EMAIL PROTECTED]>{a}{cc}};
print "nr of elements in [EMAIL PROTECTED]".($#array+1)."\n";
print "\$hash1_ref\-\>\{a\}\{cc\}=$hash1_ref->{a}{cc}\n";
print "value of key description of hash at
array\[1\]="[EMAIL PROTECTED]>{a}{cc}}[1]}{description}."\n";





2008/3/20, shaker yasa <[EMAIL PROTECTED]>:
>
>  Dear Sir
>         I'm sorry for repeating my question 3 times.  I am having
> difficulties making the move from being an MS.net programmer to being a
> perl programmer.
>
>         Herman's expanation yesterday was very helpful.
>
>         but I am still having difficulty understanding how this statement
> works:
>
>         push @{form->{"${module}_links"}{$key}} , {accno => $ref->{accno},
> description => $ref->{description}}
>
>        I hope to be clear so others understand my request .
>
> Thanks a lot for your cooperation
> with my best wishes
> Shaekir Khzym
>
> ------------------------------
> From: [EMAIL PROTECTED]
> To: [email protected]
> Date: Thu, 20 Mar 2008 22:08:41 +0200
> Subject: [Ledger-smb-devel] question< br>
> Hello
>     I am sorry for this mistake, Let me correct my question
>
>      I need to understand ,
>            @{form->{"${module}_links"}{$key}}
>       my question :
>           if the $key = "IC" then {$key} will have a reference of location
>
>           if the $key = "IC_tax" then {$key} will have a another reference
> of location
>           if the $key = "IC" again then {$key} will have another reference
> of the location .
>
>           but when use
>          @{form->{"${module}_links"}{$key}} , {accno => $ref->{accno},
> description => $ref-&g t;{description}}
>
>          if the $key = 'IC' then
>                             it will have the same Array ref instead of the
> {$key} are different ref.
>
>           How he succeed to fix the array ref for the same link...
>
>           example when link="IC" :
>                                       {$key} = hash (0x9472a28)
>                and in next row {$key} =  hash (0x9472cc8)
>       &nbsp ; ;
>                but when you apply
>
> @{form->{"${module}_links"}{$key}}
>                                                            you will find
> form->{"${module}_links"}{$key} is Array (0x9472b60) in the two case.
>
>               How ?, I couldn't understand this point.
>
>        you can see the code in ic.pm at sub create_link
>    &am p;nb sp;   the code will be
>        @{form->{"${module}_links"}{$key}} , {accno => $ref->{accno},
> description => $ref-&g t;{description}}
>
>       or this key belong to cache so no duplicated variable.
>       Please, be patient with me
>
> Thanks for your cooperation
> Shaekir Khzym
>
> ------------------------------
>
> <http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/>
>
>
> ------------------------------
> From: [EMAIL PROTECTED]
> To: [email protected]
> Date: Thu, 20 Mar 2008 20:28:24 +0200
> Subject: [Ledger-smb-devel] question
>
> Hello
>        I need to understand ,
>            @{form->{"${module}_links"}{$key}}
>       my question :
>           if the $key = "IC" then {$key} will have a reference of location
>
>           if the $key = "IC_tax" then {$key} will have a another reference
> of location
>           if the $key = "IC" again then {$key} will have the same
> reference of the location of first statment.
>           Why...
>
>        you can see the code in ic.pm at sub create_link
>        the code will be
>        @{form->{"${module}_links"}{$key}} , {accno => $ref->{accno},
> description => $ref-&a mp;a mp;g t;{description}}
>
>       or this key belong to cache so no duplicated variable.
>       Please, be patient with me
>
> Thanks for your cooperation
> Shaekir Khzym
>
> ------------------------------
>
> <http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/>
>
>
> ------------------------------
> Express yourself instantly with MSN Messenger! MSN 
> Messenger<http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/>
>
>
> ------------------------------
> Express yourself instantly with MSN Messenger! MSN 
> Messenger<http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/>
>
>
> ------------------------------
> Express yourself instantly with MSN Messenger! MSN 
> Messenger<http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Ledger-smb-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
>
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ledger-smb-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel

Reply via email to