[- srand(time); @banners = (["http://abc.com", "/banners/banner1.jpg"], ["http://def.com", "/banners/banner2.jpg"], ["http://ghi.com", "/banners/banner3.jpg"], ["http://jkl.com", "/banners/banner4.jpg"], ["http://mno.com", "/banners/banner5.jpg"], ["http://pqr.com", "/banners/banner6.jpg"]); $i=0; -] [$ while ($i++ < 3) $] [- $arrayref = splice(@banners, int rand($#banners+1), 1); ($href, $img) = @$arrayref; -] [$ endwhile $]