The Perl file 1.pl:
#!/usr/local/bin/perl -w
($b) = @ARGV;
$a = 1;
$c = $a + $b;
print "$c\n";
exit;
The python file 1.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import subprocess
b = 2
res = subprocess.call(["perl", "1.pl", str(b)])
print res
check out put
$python 1.py
output:
3
0
the output should 3,so what's wrong?