Listing 2: Automating data file creation
# pwd
/usr/local/apache/share/htdocs/site-map/data
# perl
for ($i=1; $i<10; $i++) {
$filename=($i<100?"0":"") . ($i<10?"0":"") . $i . ".txt";
open(OUT, ">$filename");
close(OUT);
}
^D
# ls
001.txt 002.txt 003.txt
004.txt 005.txt 006.txt
007.txt 008.txt 009.txt
# chown http *
#
|