adding perl examples

with adjustments to show how to find with different locator strategies
and a few other adjustments

Fixes Issue #5843