Reputation: 161
Basically in shell will do command substution like this
a=`uname -a`
then how to do in perl?
Upvotes: 2
Views: 1993
Reputation: 126722
It's pretty much identical in Perl -
$a = `uname -a`;
but, as @William Purcell says, qx
is the same and more readable.
Upvotes: 5
Reputation: 212248
$a = qx( uname -a )
The qx
operator is the same as backticks, but far more readable.
Upvotes: 9