"perl validate email" Code Answer's

You're definitely familiar with the best coding language Perl that developers use to develop their projects and they get all their queries like "perl validate email" answered properly. Developers are finding an appropriate answer about perl validate email related to the Perl coding language. By visiting this online portal developers get answers concerning Perl codes question like perl validate email. Enter your desired code related query in the search bar and get every piece of information about Perl code related question on perl validate email. 

perl validate email

By Jakes_Bakes_CodeJakes_Bakes_Code on Apr 15, 2020
# Language: Perl

sub Validate_Email($);

my $sEmail = '[email protected]';

print "For email ['$sEmail'] : " . Validate_Email($sEmail) . "\n";


sub Validate_Email($)
{
   my $sEmail = $_[0];
   my $sRetMsg = "";

   my $sUserNmRegex = "^[[:alnum:]]+([.!#\$\%&'*+-\/=?^_'{|]?[[:alnum:]]+)*";
   my $sDomainRegex = "@[[:alnum:]]+([.-]{1}[[:alnum:]]+)*";
   my $sEndRegex = "([.]{1}[[:alnum:]]+)+";

   #  Work
   #--------#

   if ($sEmail =~ /$sUserNmRegex$sDomainRegex$sEndRegex$/) {
      $sRetMsg = "Email is valid";
   }
   else {
      $sRetMsg = "Email is not valid";
   }

   return $sRetMsg;
}

Add Comment

0

All those coders who are working on the Perl based application and are stuck on perl validate email can get a collection of related answers to their query. Programmers need to enter their query on perl validate email related to Perl code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about perl validate email for the programmers working on Perl code while coding their module. Coders are also allowed to rectify already present answers of perl validate email while working on the Perl language code. Developers can add up suggestions if they deem fit any other answer relating to "perl validate email". Visit this developer's friendly online web community, CodeProZone, and get your queries like perl validate email resolved professionally and stay updated to the latest Perl updates. 

Perl answers related to "perl validate email"

View All Perl queries

Perl queries related to "perl validate email"

Browse Other Code Languages

CodeProZone