in reply to Clarifying code
Which is how I'd write it. That only eliminates one function, which doesn't necessarily make it clearer, but a little more concise, none the less. You also might want to try breaking it up and calling stat() only if $dir.'/'.$file exists, else do something different.my $prettyFileTime = localtime((stat($dir.'/'.$file)))[9]);
|
|---|