Run unix command in Perl

to run a shell command

system("ls > outfile");

open(OF, "outfile") || die $!;
@data=;
close(OF);

@dir=`ls`;
foreach (@dir) {
 ### process each line individually.
}

$dir=`ls`;
Homepage
Comments

Hide Comments