2009-11-01 ディレクトリ perl opendir, readdir, closedirを使う。 以下はカレントディレクトリの.logファイルをすべて探してくる例 opendir(THISDIR '.') or die "cannot open dir . $!"; my @allfiles = grep { /\.log$/ and -f } readdir THISDIR; closedir THISDIR;