Skip to content

Instantly share code, notes, and snippets.

@DQNEO
Created November 12, 2011 13:19
Show Gist options
  • Save DQNEO/1360508 to your computer and use it in GitHub Desktop.
Save DQNEO/1360508 to your computer and use it in GitHub Desktop.
ディレクトリ内のjpegファイル一覧を抽出してJavascriptのarrayに変換するスクリプト
use strict;
use warnings;
use List::Util;
my @photos = List::Util::shuffle glob('*.jpg');
print "var photos = [\n";
for my $photo (@photos) {
print "'$photo',\n";
}
print "];\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment