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
In reply to Re: Re: request criticism web page with images in dir (File::Find File::Spec File::glob)
by broquaint
in thread request criticism web page with images in dir (File::Find File::Spec)
by mandog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |