Updating perl writing