How can I say if $usernames length is > 20 then error();
In perl its like this
if(length($in{'password'}) < 4) { error("Your password it need to be more than 4 characters"); }
if (strlen($usernames) > 20) { error(); }
Diego