Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rand_img.psgi #6

Merged
merged 1 commit into from Aug 19, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions rand_image/rand_img.psgi
Expand Up @@ -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;

Expand All @@ -26,4 +26,4 @@ get '/test' => sub {
return '<img src="/" />';
};

dance;
dance;