in reply to Outputting contents of ls -lt

Why exactly did print `ls -lt ...` fail? Also, what information do you need from the output of ls -lt? Some it can be obtained quite easily by other means (e.g. -s, -M) than don't require invoking ls. Here's a quick, poor-man's ls:

use strict; use warnings; my $t = time; my $spd = 24*60*60; printf "%d\t%s\t%s\n", -s, scalar(localtime($t+$spd*-M)), $_ for <*.{log,txt,sql}>;

BTW, it is probably not a good idea to stick an input string right into backticks like you have in your sample code; what if someone gave you an input string like '; rm -rf * *.*' ?

the lowliest monk