If you _really_ need to force some type, you can tie the variable and check stored scalar against regexp, or you can write own xs module with required behavior. See perltie, perlxs, perlguts.
Nothing very easy (excluding tied variables), do you really need it? Perhaps some regexp check on input can satisfy your criteria...