Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: File not opening, but no error report

by Ish (Acolyte)
on Mar 26, 2009 at 02:39 UTC ( #753322=note: print w/ replies, xml ) Need Help??

in reply to File not opening, but no error report

you could add the path using map

my $DIR = "./"; opendir ( my $dir, $DIR) or die "Can't open directory $DIR: $!\n"; my @files = map { $DIR.$_ } readdir( $dir ); closedir( $dir ); foreach my $file ( grep { -f $_ } @files ) { print "\$file is $file\n"; }

Comment on Re: File not opening, but no error report
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://753322]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2015-11-30 13:59 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (771 votes), past polls