Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: readdir() only returns one result when used with

by liverpole (Monsignor)
on Oct 06, 2006 at 11:14 UTC ( #576642=note: print w/replies, xml ) Need Help??

in reply to readdir() only returns one result when used with

From this site:
On Thu, Mar 23, 2006 at 02:03:57PM +0100, Rafael Garcia-Suarez wrote: > Tom Hukins (via RT) wrote: > > and readdir() do not play well together. Run the followi +ng > > script in a directory containing several files. It only prints ou +t '.'. > > Then comment out the 'use Fatal' line and run the script again. I +t now > > prints out all the files in the directory. > > > > #!/usr/bin/perl > > > > use strict; > > use warnings; > > > > use Fatal qw(readdir); > > > > my $start_dir = '.'; > > opendir(my $dir, $start_dir); > > my [at]subdir = readdir $dir; > > closedir $dir; > > print "@subdir\n"; >


Replies are listed 'Best First'.
Re^2: readdir() only returns one result when used with
by gellyfish (Monsignor) on Oct 06, 2006 at 21:30 UTC

    It's interesting that this wasn't noticed before as not only have at least two regular p5p contributors replied in this thread but the original author of the bug report can occasionally be found here. I suppose it just goes to show how uncritical we all are when we don't suspect something might be afoot.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (1)
As of 2023-06-03 05:38 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (7 votes). Check out past polls.