updated rules with perl examples