perl: use smalloc() instead of malloc().  (ref #237)