fixed perl conversion stuff