in reply to small help with map function

Your problem isn't in the map, it's in the split. Consider using the /e modifier to the substitution; that'll let you avoid the nasty interpolation. Also, keep in mind that split "foo" means split /foo/.