- or download this
sub get_directory{
my @dirs = glob("C:\\Documents and Settings\\mydirectory\\Desktop\
+\KOMP\\*");
...
}
}
}
- or download this
#!/usr/bin/perl -w
use strict;
...
my @sub_dirs = grep {!/^\./ && -d "$dir/$_"}readdir D;
print join("\n",@sub_dirs),"\n";
- or download this
#
#example:
...
grep {!/^\./ && -d "$dir/$_"}readdir D;
return (@sub_dirs);
}