Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Re: Reading Filenames

by archen (Pilgrim)
on Jan 04, 2002 at 20:01 UTC ( #136287=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Reading Filenames
in thread Reading Filenames

As was said before, readdir (where'd the '@' come from?) is very system dependant. You might also note that MS Windows is not case sensitive, while Unix is. So if you wanted to make sure that the list came out the same on every operating system, you should probably do a case insensitive sort. Then again if you're sticking to Unix, a strait sort will be faster.

@files = sort { lc($a) cmp lc($b) } @files;
Update - oops, nevermind. I don't know what I'm talking about... not enough sleep.


Comment on Re: Re: Re: Reading Filenames
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2014-12-19 14:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (84 votes), past polls