in reply to help on reading directory
This seems a lot simpler to me. If there was an intentional reason for your complex structure (there was more to it than what you put in your post), then let me know and I will try again.if ($strPath eq "/home/dev/jhon" && -d $strPath && -r _) { foreach my $subdir ( qw(work school vacation) ) { if (-d "$StrPath/$subdir/WORKAREA/work && -r _) { my @SubList=<"$StrPath/$subdir/WORKAREA/work/*>; } } } else { #Continue about your business }
Cheers - L~R
|
|---|