use perl instead of sed for replacing stuff in wl