Help for this page
$cmd="tar -cvf xyz.tar xyz.txt 2>&1"; system($cmd);
$cmd="gzip xyz.tar 2>&1"; system($cmd);