Porting to perl