more useful options | |
PerlMonks |
system() and qx comparisonby didess (Sexton) |
on Sep 27, 2011 at 21:55 UTC ( [id://928192]=perlquestion: print w/replies, xml ) | Need Help?? |
didess has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks!
I know there are two forms for submitting a command to system :
One through the shell with the command and its parameters in one single scalar system('echo $LANG'); for example. One without the shell, with the command and its parameters in a list. like system('echo','$LANG'); With this second form, the command echo will print '$LANG' without any resolution of the variable LANG. Can I get these two different ways , and how if yes, with the qx syntax : qx {echo $LANG} ? Thanks to you!
Back to
Seekers of Perl Wisdom
|
|