in reply to converting hash to shuffled array
If you only want random and not shuffled
my( $name, $url ) = do{ my @pair; # updated!! Whoops! @pair = each %db for 0 .. rand keys %db; @pair; }; print qq(<a href="$url"><img src="/images/$name"></a>);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: converting hash to shuffled array
by sulfericacid (Deacon) on Sep 12, 2003 at 03:43 UTC | |
by BrowserUk (Patriarch) on Sep 12, 2003 at 04:19 UTC |