Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://753322]
help
Chatterbox?
Discipulus another oneliner for my quiver, if a silly one
[marto]: Beware the one liner :p
[Discipulus]: no, they are my crossword/sudoku like entertainment

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2017-09-22 08:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (260 votes). Check out past polls.

    Notices?