#!/usr/bin/perl -w use strict; my @result = map { glob($_) } "*"; foreach (@result) { if (-d "$_") { print "$_ is a directory\n"; } }