in reply to
using backticks to pass commands
If you don't mind installing a small module, capture from IPC::System::Simple works pretty well in my experience:
use IPC::System::Simple qw/capture/;
my $snmp_trap = capture '/usr/bin/snmptrap', '-v', '2c',
'-c', 'public', '127.0.0.1', '', '.18.104.22.168.4.7.34566.12343.897.0.2';
(I hope I got the args you're trying to pass correct.)
Otherwise, open would work too, although it's not as concise (e.g. open my $fh, '-|', @command or die $!; and then reading from $fh).