Perl: backticks
backticks
backticks (`command `) can be used to execute system commands
The results can be assigned as a scalar or list
@dirlist = `ls -l`; # Get a listing of the current directory
# @dirlist = `dir` would work on Windows/DOS
$num = #$dirlist + 1; # get the number of lines returned
print "There are $num files in this directory\n";