Created
November 12, 2011 13:19
-
-
Save DQNEO/1360508 to your computer and use it in GitHub Desktop.
ディレクトリ内のjpegファイル一覧を抽出してJavascriptのarrayに変換するスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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