in reply to query a MAC address

You did not specify your OS - you could do this in Perl using an SNMP module but why ?

The previous comment shows the *nix way.

The Win32 (NT and above) would require snmputil from the NT resource kit. The general syntax for your SET operation would be
snmputil set <agent-IP> <community-name> OID value