Comment puis-je stocker le résultat d'un système de commande dans une variable Perl?

$ cat test.pl
my $pid = 5892;
my $not = system("top -H -p $pid -n 1 | grep myprocess | wc -l");
print "not = $not\n";
$ perl test.pl
11
not = 0
$

Je veux capturer le résultat c'est à dire 11 dans une variable. Comment puis-je le faire?

InformationsquelleAutor Lazer | 2010-10-04