連番のH画像を一気にダウンロードする

このエントリーをはてなブックマークに追加
32これはどうよ
1です。
13さんのパールスクリプトをお手本にして、徹夜で対話式連番作成パールスクリプトを作ってみました。
初めてのスクリプトです。お手柔らかにお願いします。

#!/usr/bin/perl
print "What is URL? (Default=http://www.hoge.ac.jp/img/)
http://";
$host = <STDIN>;
if ($host eq "\n") {
$host = "www.hoge.ac.jp/img/";
} else {
chomp($host);
}
print "What is filename? ";
$name = <STDIN>;
chomp($name);
print "What is file type? (default=jpg) ";
$typ = <STDIN>;
if ($typ eq "\n") {
$typ = "jpg";
} else {
chomp($typ);}
print "What is first number? (default=1) ";
$i = <STDIN>;
if ($i eq "\n") {
$i = 1;
} else {
chomp($i);}
print "What is last number? (default=52)" ;
$m = <STDIN>;
if ($m eq "\n") {
$m = 52;
} else {
chomp($m);}
open(FILE, ">list");
while ($i < $m+1) {
printf(FILE "%s%s%s%02d%s%s%s", "http://", $host, $name, $i++, ".", $typ, "\n");
}
close(FILE);