I am new to perl having basic idea about the programming and scripting
language, so I am learning Perl through Perl Cookbook, 2nd edition.

on page 118, (receipe 4.4 Implementing Sparse Array), Here is one
statement.

Using a hash representation, you should instead do either this to
process elements in index order:

foreach $element ( @fake_array{ sort {$a <=> $b} keys %fake_array } )
{
    # do something with $element
}

Question: I am not able to understand the statement -"@fake_array
{ sort {$a <=> $b} keys %fake_array }".
I understood that we are sorting the keys of a hash %fake_array. But
what is the meaning of @fake_array here???

Appreciate your help to explain me this.

Regards
RP..


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to