rings100's プログラミング
Perl,PHPなどのWeb系プログラミングのTipsです。
Showing posts with label
配列
.
Show all posts
Showing posts with label
配列
.
Show all posts
Sunday, March 25, 2007
指定の配列のランダム
my @id =(0,1,2,3,4,5,6,7,8,9);
my @ret;
for (1..@id) {
push @ret, splice(@id, int(rand(@id)), 1);
}
print @ret;
Older Posts
Home
Subscribe to:
Posts (Atom)