Rename 'wait_time' to 'attempts' as it more accurately expresses the intent; add a real 'wait_time' argument too
Use /usr/bin/env on shebang line to cope with other perls; declare requireing 5.14 for package NAME { BLOCK } syntax