$results = getInput( -prompt=>"Enter a username: ", -type=>STRING, -minLen=>3, #minimum length -maxLen=>15, #max length -restrictTo=>sub{/[A-Za-z0-9_@.-]+/} # the idea is to be able to pass a regex to validate -maxTries=>10);