The biggest difference is what each one returns. system returns the return value of the whatever you executed, whereas backticks capture and return whatever said program printed on STDOUT. This is the property which usually determines which you want to use. There are a few other differences, however; the multiple-argument form of system skips the shell, thus eliminating the risk of having to deal with shell metacharacters, for example.
perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'
In reply to Re: system call vs. back quotes
by Chmrr
in thread system call vs. back quotes
by Ras
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |