#!/usr/bin/perl # # Written by Marc Liyanage (http://www.entropy.ch) # print iso2mac(join("", <>)); sub iso2mac { my ($string) = @_; $string =~ tr/\xa0\xa1\xa4\xa5\xa7\xa8\xaa\xab\xac\xae\xaf\xb0\xb4\xb6\xb7\xb8\xba\xbb\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd1\xd2\xd3\xd4\xd6\xd8\xd9\xda\xdb\xdc\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xff/\xca\xc1\xdb\xb4\xa4\xac\xbb\xc7\xc2\xa8\xf8\xa1\xab\xa6\xe1\xfc\xbc\xc8\xc0\xcb\xe7\xe5\xcc\x80\x81\xae\x82\xe9\x83\xe6\xe8\xed\xea\xeb\xec\x84\xf1\xee\xef\x85\xaf\xf4\xf2\xf3\x86\xa7\x88\x87\x89\x8b\x8a\x8c\xbe\x8d\x8f\x8e\x90\x91\x93\x92\x94\x95\x96\x98\x97\x99\x9b\x9a\xd6\xbf\x9d\x9c\x9e\x9f\xd8/; return $string; }