Help for this page
# This is cat.pl while(<>) { print; }
# This is ls.pl use strict; ... my @result=<OUTPUT>; close OUTPUT; print "RESULT:\n@result\n";
perl ls.pl
RESULT: first line second line