On Fri, Jul 27, 2001 at 04:13:08PM -0500, Shepard, Gregory R wrote:
> It still appears that the -T is also reading the directories in to the hash.
> the statement below looks logical. Is there a test to specifically exclude
> directories?
There is a test to check if a file is a directory, perldo
You guys are great!
-Original Message-
From: Wagner-David [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 4:46 PM
To: [EMAIL PROTECTED]
Subject: RE: Read text files only into a hash
I made the change as
$dir_file = "$dir/$file";
next if ( -d
Original Message-
From: Shepard, Gregory R [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 14:13
To: [EMAIL PROTECTED]
Subject: RE: Read text files only into a hash
It still appears that the -T is also reading the directories in to the hash.
the statement below looks logical
--
From: Mooney Christophe-CMOONEY1 [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 3:56 PM
To: Mooney Christophe-CMOONEY1; [EMAIL PROTECTED]
Subject: RE: Read text files only into a hash
Sorry -- let me try that again ...
Why don't you change your next statement to:
next unless -T
Sorry -- let me try that again ...
Why don't you change your next statement to:
next unless -T "$dir/$file" || /^\./;
-Original Message-
From: Shepard, Gregory R [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 3:47 PM
To: [EMAIL PROTECTED]
Subject: Read text fi
Why don't you change your next
'next unless -T "$dir/$file"';
That will skip over any non-text files, including dirs and '.'
-Original Message-
From: Shepard, Gregory R [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 3:47 PM
To: [EMAIL PROTE
All,
I am trying to read only text files (using the -T test) from a directory
into a hash, and not directories themselves. How do I prevent it from it
reading in directories? This sounds like a basic question and know there is
probably an easy answer... but I can't think of it. Thanks.
@ARG