use strict; use CGI; my $c = CGI->new; print $c->header("text/plain"); my @path = split '/','D:/tools/Perl/site/lib/auto/DBD/Sybase/Sybase.dll'; for (0 .. $#path) { my $check = join('/',@path[0 .. $_]); print -x $check ? "can" : "can't", " execute $check\n"; print -r $check ? "can" : "can't", " read $check\n"; }