He's right. The reason why it isn't catching the "dot" directories is
because the negative match operator is !~, not !.
-Original Message-
From: Harry Putnam [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 22, 2002 7:47 AM
To: [EMAIL PROTECTED]
Subject: Re: Quest
On Saturday, June 22, 2002, at 05:28 , Erik Riggenbach wrote:
> so here's my code and the problem is that it doesn't a) ignore the . and
> ..
> dirs b) it doesn't acknowledge some dirs as being dirs.
[..]
> readmydirs('/mp3');
>
> sub readmydirs{
>opendir(DIR, $_[0]);
>my @lists = readd
Harry Putnam <[EMAIL PROTECTED]> writes:
>> readmydirs('/mp3');
>>
>> sub readmydirs{
>>opendir(DIR, $_[0]);
>>my @lists = readdir DIR;
>>foreach my $element (@lists){
>
> Maybe you need an explicit match here:
>
>> if(-d $element and !/^\.{1,2}$/){
>if(-d $element and $
"Erik Riggenbach" <[EMAIL PROTECTED]> writes:
> so here's my code and the problem is that it doesn't a) ignore the . and ..
> dirs b) it doesn't acknowledge some dirs as being dirs. With some examples
> where there are lots of files and Dirs it does print the '-' before the
> dirs. Needless to
so here's my code and the problem is that it doesn't a) ignore the . and ..
dirs b) it doesn't acknowledge some dirs as being dirs. With some examples
where there are lots of files and Dirs it does print the '-' before the
dirs. Needless to say, if the recursion is not commented out it's an
infi