Re: How does opendir/readdir process files

2015-01-08 Thread John SJ Anderson
On Thu, Jan 8, 2015 at 5:52 PM, Harry Putnam wrote: > Opening a directory and readdir with a grep in there to find specific > filenames, how does that process collect the files? See http://www.perlmonks.org/?node_id=533744 tl;dr: it depends on your OS. > I mean will the generated @ar of files

How does opendir/readdir process files

2015-01-08 Thread Harry Putnam
Opening a directory and readdir with a grep in there to find specific filenames, how does that process collect the files? I mean will the generated @ar of files be oldest first or someother reliable order? Using an example paraphrased from perldoc -f readdir: (I changed the regex) opendir(my $

Re: is faster a regexp with multiple choices or a single one with lower case?

2015-01-08 Thread David Precious
On Wed, 7 Jan 2015 10:59:07 +0200 Shlomi Fish wrote: > Anyway, one can use the Benchmark.pm module to determine which > alternative is faster, but I suspect their speeds are not going to be > that much different. See: > > http://perl-begin.org/topics/optimising-and-profiling/ > > (Note: perl-beg

Re: is faster a regexp with multiple choices or a single one with lower case?

2015-01-08 Thread Luca Ferrari
Hi Bill, On Thu, Jan 8, 2015 at 1:36 AM, $Bill wrote: > Why not just ignore the case ? Sure it's an option. > Why does the script care what the case is ? Is there a rationale for > checking it ? Of course there's, and of course my script does different things depending on what I'm looking at.