attempt using perl instea of gnu grep for compatibility