use IPC::Run; run [qw{sudo /usr/bin/python /home/processLog.py}, $name, $age, $text, $id], ">", \(my $return) or die "run: $?"; return $return;