The mailer was implying that you have 

                my $dir = 'c:\xxx\xxx';
                         where this has your directory location
        
        Wags ;)
-----Original Message-----
From: Auernheimer, Rebecca (CORP, Consultant)
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 15:55
To: [EMAIL PROTECTED]
Subject: RE: filter list of files from directory into array


When I tried:

    my @filelist = grep { -f "$dir/$_" && m/^\d{5,6}$/}  readdir DIR;

I got this message:

Global symbol "$dir" requires explicit package name at
C:\perl\practice\test.pl line 5.
Execution of C:\perl\practice\test.pl aborted due to compilation errors.

I was going to ask about $dir anyway, because I don't know where it came
from.

-----Original Message-----
From: Felix Geerinckx [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 3:40 PM
To: [EMAIL PROTECTED]
Subject: RE: filter list of files from directory into array


on Thu, 20 Jun 2002 22:29:45 GMT, David Wagner wrote:

>      But unless you have done a chdir it will only pass the file name or
> directory name and not do what you want.


You are absolutely right. The line should read:

    my @filelist = grep { -f "$dir/$_" && m/^\d{5,6}$/}  readdir DIR;

where $dir contains the directory. Thanks for spotting this.

-- 
felix



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to