in reply to Re: request criticism web page with images in dir (File::Find File::Spec File::glob)
in thread request criticism web page with images in dir (File::Find File::Spec)
And if you're worried about speed, then the modulo operator is probably the least of your worries, as pretty much all operations are going to be costly (but if you were really looking for speed, then you'd be using C ;o) This should eliminate a lot of unncessary operations ie saving an array into memory but only using one element, and having to enter the size_cmp function for every comparison.sub get_files { return sort { (stat($a))[9] <=> (stat($b))[9] } glob($_[0]."/*.{jpg,jpeg,png}") or die($_[0]." contained no images\n"); }
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: request criticism web page with images in dir (File::Find File::Spec File::glob)
by mandog (Curate) on Sep 14, 2001 at 18:27 UTC |