in reply to converting hash to shuffled array
my $r = int(rand(keys %db)); my $i = 0; foreach (keys %db) { if($r == $i){ print qq(<a href="$_"><img src="/images/$db{$_}"></a>); last; } $i++; } [download]
- Tom