[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: this is my question
- Subject: Re: this is my question
- From: shaker yasa <..hidden..>
- Date: Wed, 26 Mar 2008 17:19:34 +0200
Dear Herman
Thanks a lot for your reply. I was useful to me. I understood it after study your example.
best wishes
Shaekir Khzym
________________________________
> Date: Fri, 21 Mar 2008 15:41:15 +0100
> From: ..hidden..
> To: ..hidden..
> Subject: Re: [Ledger-smb-devel] this is my question
>
> another exercise
>
> #tree dimensional hash
> my @array=();
> print "nr of elements in \@array=".($#array+1)."\n";
> my %hash3=(accno=>'0123',description=>'test0');
> push @array,\%hash3;
> print "nr of elements in \@array=".($#array+1)."\n";
> print "value of key accno of hash at array\[0\]=".$array[0]->{accno}."\n";
>
> my %hash2=(aa=>'aaa',bb=>'bbb',cc=>\@array);
> 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\]=".${@{$hash1_ref->{a}{cc}}[0]}{description}."\n";
> push @{$hash1_ref->{a}{cc}},{accno =>'4567',description=>'test1'};
> @array=@{$hash1_ref->{a}{cc}};
> print "nr of elements in \@array=".($#array+1)."\n";
> print "\$hash1_ref\-\>\{a\}\{cc\}=$hash1_ref->{a}{cc}\n";
> print "value of key description of hash at array\[1\]=".${@{$hash1_ref->{a}{cc}}[1]}{description}."\n";
>
>
>
>
>
> 2008/3/20, shaker yasa <..hidden..>:
> 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: ..hidden..
> To: ..hidden..
> 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)
> ; ;
> 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
> ________________________________
>
>
>
> ________________________________
> From: ..hidden..
> To: ..hidden..
> 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
> ________________________________
>
>
>
> ________________________________
> Express yourself instantly with MSN Messenger! MSN Messenger
>
> ________________________________
> Express yourself instantly with MSN Messenger! MSN Messenger
>
> ________________________________
> Express yourself instantly with MSN Messenger! MSN Messenger
>
> -------------------------------------------------------------------------
> 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
> ..hidden..
> https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
_________________________________________________________________
Connect to the next generation of MSN Messenger
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline