in reply to validations in perl

> Please tell me where I'm doing wrong.

1. Consider using Mojolicious instead of CGI.pm

2. This is weird:

use CGI qw(:standard); print "content-type:text/plain\n\n"; my $query = CGI->new();
Do this instead;
use CGI qw(:standard); my $query = CGI->new(); print $query->header('text/plain');
3. Should the phone number only start with digits 6, 7, 8, or 9?
# Typo? if($Phonenumber=!/^[6-9]+\d/) # Fixed, but... if($Phonenumber !~ /^[6-9]+\d/)