Browse files

Merge pull request #6 from chromatic/patch-2

Update rand_img.psgi
  • Loading branch information...
2 parents 9317855 + 191577f commit f9b00995274d30fb43aba32e8d987efe67546ed6 @davorg committed Aug 18, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 rand_image/rand_img.psgi
View
4 rand_image/rand_img.psgi
@@ -11,7 +11,7 @@ my $img_dir = 'public/img';
get '/' => sub {
opendir my $dir, $img_dir or die $!;
my @imgs = grep { -f "$img_dir/$_" } readdir $dir;
- my $img = @imgs[rand @imgs];
+ my $img = $imgs[rand @imgs];
warn $img;
@@ -26,4 +26,4 @@ get '/test' => sub {
return '<img src="/" />';
};
-dance;
+dance;

0 comments on commit f9b0099

Please sign in to comment.