port libemb.py to perl
Merge branch 'issue/106'