Here's an example:
use strict; use warnings; my $PATH = '.'; explore($PATH); sub explore { my $PATH = shift; opendir(my $DIR, $PATH) or return; while (my $SUB = readdir $DIR) { next if $SUB eq '.' or $SUB eq '..'; $SUB = "$PATH/$SUB"; if (-d $SUB) {} if (-f $SUB) {} } close $DIR; }
In reply to filesystems & Perl by harangzsolt33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |