I've wrote several perl scripts during my internship, and I would like to simplify the use of them. The scripts asks in arg, a mac address, and returns which switch is connected, speed...etc.
Instead of giving a mac address, I would like to give a host name of a computer. So, how can I resolve the hostname to mac address ?
Thanks, bye.  
Edit -> Solution could be : bash command or perl module or something powerfull like that...
The ethers file on a UNIX system maps Ethernet address to IP-number (or hostname).  If your /etc/ethers is properly maintained, you can look it up in there.
Resolve mac address by host name