Perl: System Call

By Xah Lee. Date: . Last updated: .

In Perl, to do a system call, use qx() or system(). The qx command returns unix's stdout and do wait for the process to finish. Example:

# -*- coding: utf-8 -*-
# perl

qx(gzip x.txt);
qx(gzip -d x.txt.gz);