in reply to System() or the like

You can use the backticks (like the apostrophe, but slanted the other way... usually found next to the !/1 key) to capture the output of another process....
$run="snmpwalk $host $opt_c ifType.".$thisport; $type=`$run`; print "$MAC $type $ifName $vlan $host\n";

-Blake