in reply to regex challenged
Besides using placeholders as moritz said, it is always easier to test for characters you want allowed (a known set) in a regex, rather then trying to come up with what isn't allowed (an unknown large set).
if ( $User =~ /^[a-z0-9]+$/i ) { # Allowed }
In Section
Seekers of Perl Wisdom