in reply to reading files and directories

The order in which they appear in my while loop doesn't seem to matter which seems kinda weird to me.
How do you figure? The order matters.
Eventually all of it will need to get printed out to a file, but I'll cross that bridge soon
perldoc -f open, perldoc -f select

Replies are listed 'Best First'.
Re: Re: reading files and directories
by ctp (Beadle) on Jan 07, 2004 at 16:01 UTC
    I switched them around and the output didn't change. That's the part that seemed kinda weird to me. To my mind the output would have switched too.
      Switched what around? readdir will return the files in the actual order they are in the directory. AFAIK, most OS's don't give you any control over the actual order (though filesystems based on btrees (NTFS?) will have an automatic order.)
        I swapped the if -d and if -T statements, but either way the directories print out after the text files.