Mercurial > mercurial > hgweb_iklist.hg.cgi
annotate prog/04.pl @ 3:d3e201c48ff8 draft default tip
bug fix.
author | pyon |
---|---|
date | Wed, 29 Sep 2021 22:04:51 +0900 |
parents | 520044113ef0 |
children |
rev | line source |
---|---|
0 | 1 # ランダム文字列でファイルを埋める |
2 | |
3 my @z = split //, "abcdefghijklmnopqrstuvwxyz0123456789"; | |
4 for (1..541) { | |
5 my $fn; | |
6 $fn .= $z[int(rand scalar @z)] for (1..8); | |
7 $fn .= sprintf "%04d", $_; | |
8 $fn .= $z[int(rand scalar @z)] for (1..4); | |
9 | |
10 open my $f, '>', $fn; | |
11 for (1..1024) { | |
12 print {$f} $z[int(rand scalar @z)] for (1..48); | |
13 print {$f} "\n"; | |
14 } | |
15 close $f; | |
16 } | |
17 |