problems with reading a file from a directory 
Author Message
 problems with reading a file from a directory

Hi,
I am trying to open a directory and read a file which is compressed(.Z).
I am getting an error "Use of uninitialized value at qf_system_blast.pl line 179."
what am I doing wrong?
can I read a compressed file? or should it be uncompressed first?
Here is the code I am using, please advise.


opendir(DIR, $mns_dir) || die("Cannot open directory");
print "$DIR is my directory!!!!!!!!";
while (my $tempfiles = readdir DIR) {
  print $tempfiles  if $tempfiles =~ /RPTPRINT.MNS206AR.24Jun01_13.37.48.Z/;}
closedir DIR;

Nina



Sat, 13 Dec 2003 08:02:49 GMT  
 problems with reading a file from a directory

Quote:
> Hi,
> I am trying to open a directory and read a file which is compressed(.Z).
> I am getting an error "Use of uninitialized value at qf_system_blast.pl line 179."
> what am I doing wrong?
> can I read a compressed file? or should it be uncompressed first?
> Here is the code I am using, please advise.


> opendir(DIR, $mns_dir) || die("Cannot open directory");
> print "$DIR is my directory!!!!!!!!";
> while (my $tempfiles = readdir DIR) {
>   print $tempfiles  if $tempfiles =~ /RPTPRINT.MNS206AR.24Jun01_13.37.48.Z/;}
> closedir DIR;

$DIR is not defined here, is it defined elsewhere?  Is that line 179?

--
David Efflandt  (Reply-To is valid)  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/



Sat, 13 Dec 2003 09:09:20 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Reading directories, entering directories, chaning file permissions...

2. File Directory and read File

3. Reading files in a directory and printing to one txt file

4. Problem to read DOS directory from SCO UNIX

5. Problem reading an NT directory

6. help selecting and displaying specific files after reading directory:

7. finding a file in a directory and reading it

8. Win32::File - Reading NTFS directories

9. Reading file names but not directories

10. Q: How to read all the file name in a directory

11. Read directory and not files

12. read files/directories 'above' script

 

 
Powered by phpBB® Forum Software