From a perl program, I'm trying to issue an "ls" command and capturing the results into an array instead of placing it into a file. I need to be able to look at each line of the output and pick out certain pieces of information.
With the command below, I have been able to capture the output but I can't dissect it into individual lines. Is there a way to do this - and if so - how can it be done?
I'm not a newbie to Perl however I am definitely far from being an expert.
Command I'm using:
$output = system("ls *.txt -lt"
;
Thanks in advance for any help you send me.
With the command below, I have been able to capture the output but I can't dissect it into individual lines. Is there a way to do this - and if so - how can it be done?
I'm not a newbie to Perl however I am definitely far from being an expert.
Command I'm using:
$output = system("ls *.txt -lt"
Thanks in advance for any help you send me.