in reply to directory?

Use the -d e.g
foreach $n(@array) { if (-d $n) { ## do stuff } }
See. the file test manpage for more info.
HTH

_________
broquaint

Replies are listed 'Best First'.
Re: Re: directory?
by ctilmes (Vicar) on Jul 01, 2003 at 13:32 UTC
    Or even:
    foreach $n (grep { -d } @array) { ## do stuff }
      Or even:
      do {'stuff'} for grep -d, @array;
      or maybe pass the buck to a subroutine:
      some_sub() for grep -d, @array;

      jeffa

      L-LL-L--L-LL-L--L-LL-L--
      -R--R-RR-R--R-RR-R--R-RR
      B--B--B--B--B--B--B--B--
      H---H---H---H---H---H---
      (the triplet paradiddle with high-hat)