/ Published in: Perl
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/usr/bin/perl -w use strict; # # List empty directories # perl administration posix # # set start path sub checkpath { # open path or die # debug #print "I am here: $path\n"; # get directory content but skip . and .. (to avoid circular looping) # print directory name and exit if empty if (!@content) { } # recurse trough directories checkpath($path.'/'.$subpath); } } checkpath($startpath);