Make sure you take into account the path if not in the current directory.#!/usr/bin/perl use warnings; use strict; my @dirs = grep{-d $_}glob "*"; print join "\n",@dirs;
In reply to Re: Getting a list of directories matching a pattern
by Marshall
in thread Getting a list of directories matching a pattern
by Perlfan.Felix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |