in reply to RE: opening a file
in thread opening a file

The problem is, the files dont have an extension, they are just called de-nj-md for example. Kilinrax, I tried it the way you showed me and the array's still came up blank? Any suggestions??
Thanks Guys
Dipul

Replies are listed 'Best First'.
RE: RE: RE: opening a file
by kilinrax (Deacon) on Oct 31, 2000 at 23:01 UTC
    This script will check the files you named to see that they all exist, are readable by the script, and are not empty.
    Hopefully, running it will help you pinpoint the problem.
    #!/usr/bin/perl -w use strict; my @files = ("/mnt/csphil/home/fburns/domereports/Weekly_Reports/de-nj +-md", "/mnt/csphil/home/fburns/domereports/Weekly_Reports/pa_only", " +/mnt/csphil/home/fburns/domereports/Weekly_Reports/phila_market"); my $file; foreach $file (@files) { if (! -e $file) { warn "$file does not exist"; next; } warn "$file is unreadable" unless -r $file; warn "$file has zero size" if -z $file; }