if(embedStylesPrinted != true) {document.write('');}var embedStylesPrinted = true;var content = '
Untitled
perl
#! /usr/local/bin/perl
 
#tree .. カレントディレクトリ以降のファイルリストを作成
 
$dir = `pwd`;
print $dir;
$dep =1;
&dirproc($dep);
 
sub dirproc {
my($dep) = @_;
my(@files,$file);
@files = sort(glob("*"));
foreach $file(@files) {
if (-f $file){
for ($i = 1; $i <= $dep; $i++){
print "|\\t";
}
print $file."\\n";
}
}
 
foreach $file(@files) {
if (-d $file){
for ($i = 1; $i <= $dep; $i++){
print "|\\t";
}
print $file."\\n";
++$dep;
chdir($file);
&dirproc($dep);
chdir("..") or die "abend. don't ask me why";
--$dep;
}
}
}
';document.write(content);