my $mycmd = "test.py";#test.pl my @res = qx/$mycmd/; #### #!/usr/bin/env python import sys import os os.system("ping 127.0.0.1 > NUL")