I don't recommend using the quotemeta operator. That will usually misquote newlines with POSIX-like shells.
Instead, skip the shell and use the multiple argument form pipe open, such as
my @command = "sudo", "/usr/bin/python", "/home/processLog.py", $n
+ame, $age, $text, $id;
open my $P, "-|", @command or
die "error pipe opening program";
$output = <$P>;
close $P or
die "error: spawned program exited with failure or cannot read
# note: you may want to accept an exit failure with some programs.
+ if you do, check eof($P) instead to catch a read error.
Update: added "skip the shell".