in reply to Problem pulling directories out of an array.
Cheers - L~R#!/usr/bin/perl -w use strict; my $dirtoget = './CSOC'; opendir( IMD , $dirtoget ) or die "Unable to open $dirtoget : $!"; for my $file ( readdir IMD ) { my $fqp = $dirtoget . '/' . $file; print -d $fqp ? "$fqp is a directory\n" : "$fqp is not a directory +\n"; }
Update: Added $dirtoget to directory test as noted by other monks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Problem pulling directories out of an array.
by bkiahg (Pilgrim) on Feb 02, 2004 at 18:40 UTC |