On Thu, 10 Jul 2014 11:54:07 -0700
Bob goolsby wrote:
> Nota Bene:
> xxx@zzz.www IS NOT the only valid format for an email
> address In this case, you really need to rethink your objection
> to using the proper CPAN module
*This*.
Use the well-trusted, battle-tested CPAN module. Whate
On Jul 10, 2014, at 11:50 AM, Natxo Asenjo wrote:
> On Thu, Jul 10, 2014 at 1:00 AM, Jim Gibson wrote:
>
> On Jul 9, 2014, at 2:58 PM, Natxo Asenjo wrote:
> > On Wed, Jul 9, 2014 at 10:35 PM, Jim Gibson wrote:
> > On Jul 9, 2014, at 1:20 PM, Natxo Asenjo wrote:
>
> In order to use the hash m
That's a lot of regex.
On 7/10/14, 2:25 PM, Ron Bergin wrote:
Sunita Pradhan wrote:
I do not want to use Cpan modules .
-Sunita
What do you have against using a cpan module?
If you don't want to use the module, then why not simply copy/use the
regex that it uses to do the validation?
$RFC8
Sunita Pradhan wrote:
> I do not want to use Cpan modules .
>
> -Sunita
>
What do you have against using a cpan module?
If you don't want to use the module, then why not simply copy/use the
regex that it uses to do the validation?
$RFC822PAT = <<'EOF';
[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:
the "r...@i.frys.com" address may not be matched by my regexp, because here two
dots after @. Here it is more universal: /\A.+?\@.+?\..+\Z/
10.07.2014, 21:43, "Sunita Pradhan" :
> I do not want to use Cpan modules .
>
> -Sunita
>
>> Date: Thu, 10 Jul 2014 11:33:24 -0700
>> Subject: Re: script to
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";
}
On Thu, Jul 10, 2014 at 1:42 PM, Sunita Pradhan <
sunita.pradhan.2...@hotmail.com> wrote:
> I do not want to use Cpan modules .
>
Depending upon how "correct" you want to be, it's not easy:
http://stackoverflow.com/questions/210945/what-would-be-a-globally-accepted-regular-expression-to-match-e-
Then take a look at the Owl (Regular Expressions) book. The first
appendix, if I recall correctly) has an regex that will validate an e-mail
address. The regex is something over 2,000 characters long. Nota Bene:
xxx@zzz.www IS NOT the only valid format for an email address In
this case,
On Thu, Jul 10, 2014 at 1:00 AM, Jim Gibson wrote:
>
> On Jul 9, 2014, at 2:58 PM, Natxo Asenjo wrote:
> > On Wed, Jul 9, 2014 at 10:35 PM, Jim Gibson
> wrote:
> > On Jul 9, 2014, at 1:20 PM, Natxo Asenjo wrote:
>
> In order to use the hash method of determining uniqueness, you must
> convert
On Jul 10, 2014, at 11:30 AM, Sunita Pradhan wrote:
> 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,
I've used Email::Valid for this and it works nicely. And the code to
use it is pretty easy
I do not want to use Cpan modules .
-Sunita
> Date: Thu, 10 Jul 2014 11:33:24 -0700
> Subject: Re: script to match a valid email id
> From: r...@i.frys.com
> To: sunita.pradhan.2...@hotmail.com
> CC: beginners@perl.org
>
> Sunita Pradhan wrote:
> > I want to write a script which will verify a
Sunita Pradhan wrote:
> 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
>
Take a look at the Email::Valid module.
http://search.cpan.org/~rjbs/Email-Valid-1.194/lib/Email/Valid.pm
--
To unsubscrib
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
You can try using a reference instead of hash like :
--
my $entries;
my($state, $zipcodes);
while (my $line = ) {
chomp $line;
($state, $zipcodes) = split (/=/, $line);
push( @{ $entries->{$state} }, split( /,/,$zipcodes) )
}
print Dumper ($entries);
__DATA__
AK=995,
On Jul 10, 2014, at 9:00 AM, Ron Bergin wrote:
> my($state, @zipcodes) = split /[=,]/, $line;
Interesting concept, the multiple split. I'd be interested in knowing
how Perl knows to give the singular value on the left of the "=" to $state and
all other values split on the "," to @zipcod
Ron Bergin wrote:
> Others have already pointed what you were doing wrong, so I'll point out
> something else.
>
> Instead of using 2 separate split statements, I'd use a single split
> statement to assign $state and a @zipcodes array.
>
> use 5.010;
> use strict;
> use warnings;
> use Data::Dumpe
SSC_perl wrote:
> If someone could explain what I'm doing wrong, I'd appreciate it. I
> just
> can't see it.
>
> Thanks,
> Frank
>
> --
>
> use strict;
> use warnings;
> use 5.010;
>
> use Data::Dumper;
>
> my %entries;
>
> while (my $line = ) {
> chomp $line;
Hi Frank
On 07/10/2014 11:02 AM, SSC_perl wrote:
On Jul 10, 2014, at 7:14 AM, Nathan Hilterbrand wrote:
$entries{$state} = [ (split /,/ => $zipcodes) ];
Thanks, Nathan. The line above caught my eye. It's interesting to see
that you don't need both 'push' and 'split' to populate th
On Jul 10, 2014, at 7:14 AM, Nathan Hilterbrand wrote:
> $entries{$state} = [ (split /,/ => $zipcodes) ];
Thanks, Nathan. The line above caught my eye. It's interesting to see
that you don't need both 'push' and 'split' to populate the hash.
Could you explain a little about wh
19 matches
Mail list logo