$ perl -le 'chomp($v = qx/tar --version 2>&1/); print $v' tar (GNU tar) 1.15.1