added perl modes