in reply to Re: Re: converting hash to shuffled array
in thread converting hash to shuffled array
Why is there a my $pair? I only see it being used in that one statement.
Um! Cos I made a mistake! It should be @pair and now is:)
Why is there a @pair at the end when the previous line is giving it a value?
The previous line loops a random number of time setting the @pair to succesive key/value pairs from the hash.
Once the loop stops, the last statement becomes the return value for the do block, and so the last key/value pair assigned to the array @pair, get assigned to the variables $name and $url.
|
|---|