in reply to Perl Variables
Wow, you're slightly ahead to use Perl 6, well sort of :-)
Saying,
means declaring a hash (%A_Hash), or declaring and initailizing it with empty element (%B_Hash), or declaring and initializing it with some element (%C_Hash). While,my %A_Hash; #or my %B_Hash = (); #or my %C_Hash = (one => 1);
means obtaining a value of a_key or $key element from %Some_Hash.my $value = $Some_Hash{a_key}; #or my $other_value = $Some_Hash{$key};
Can you see the difference? The perldata says more about this. Another thing, $tgs = @_; means that $tgs will contain the number of elements of @_. If you want to get the (first) element, you would say ($tgs) = @_;, or $tgs = shift.
And yes, saying %Some_Hash{key} to get the value of 'key' element of %Some_Hash is introduced in Perl 6.
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!
|
|---|