A perl simulation environment