2019-09-12 10:33:56 -07:00
|
|
|
my @results = qx(ls); # run command and return STDOUT as a string
|
2013-04-10 16:57:12 -07:00
|
|
|
|
2019-09-12 10:33:56 -07:00
|
|
|
my @results = `ls`; # same, alternative syntax
|
2013-04-10 16:57:12 -07:00
|
|
|
|
2019-09-12 10:33:56 -07:00
|
|
|
system "ls"; # run command and return exit status; STDOUT of command goes program STDOUT
|
2013-04-10 16:57:12 -07:00
|
|
|
|
2019-09-12 10:33:56 -07:00
|
|
|
print `ls`; # same, but with back quotes
|
|
|
|
|
|
|
|
|
|
exec "ls"; # replace current process with another
|