use the regular expression for checking @ and dot and length of some address' parts:) for example, try this:
#!/usr/bin/perl use warnings; use strict; use 5.014; print "enter the email address "; while (<>) { if(/\A.{4,15}\@.+?\..{2,3}\Z/) { print "it's correct\n"; } else { print "it is not correct\n";} } for my email: 4-15 is length of rozanda2014 2-3 is length of ru (may be com) 10.07.2014, 21:31, "Sunita Pradhan" <sunita.pradhan.2...@hotmail.com>: > I want to write a script which will verify a valid email address . > Could anybody give some ideas , how to write a pattern for this ? > > -Sunita -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/