Use the $x = `cmd`; form to get the results of the command into the variable.
The $x = system "$cmd"; form executes the command in $cmd, and puts the result code into $x.
Also, don't put a space inside your code tag--it's difficult to read your post.
--roboticus Update: Clarified second statement.
In reply to Re: getting the output of command in variable
by roboticus
in thread getting the output of command in variable
by phemal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |