RE: email validation

2008-11-10 Thread Bob McConnell
From: Dermot > 2008/11/10 Rob Coops <[EMAIL PROTECTED]>: >> On Mon, Nov 10, 2008 at 11:55 AM, Anusha Krishna chand < >> [EMAIL PROTECTED]> wrote: >> >>> Hi All, >>> How to validate an email id using perl regular expression . >>> > ... >> >> As for how to actually do that... there are a

algorithm permute

2008-11-10 Thread Sharan Basappa
Hi, After working fine with Algorithm::Permute module for weeks now, suddenly I seem to be getting errors. The particular error is: $ perl StTrAuto.pl Can't locate Algorithm/Permute.pm in @INC (@INC contains: /u/sharan/local/perl/perm_install/lib/perl5/site_perl .) at StTrAuto.pl line 4. BEGIN fa

insert keyword

2008-11-10 Thread Sharan Basappa
Hi, I have a string that has value delimited by space e.g. 1 2 10 8 etc. I need to add a keyword wherever there is a space. I wrote a small code to try this out: $str = "one two three"; $str =~ s/\s/x /g; In this case, I am trying to insert x where there is a space. one two three should become

hash slice??

2008-11-10 Thread Travis Thornhill
Is there such a thing?   I'm trying to take a HoH and make a reference to a sub-part of the hash.   This doesn't work:   my %sub_hash = $main_hash{'sub_hash'};   I get the following error: Reference found where even-sized list expected at ./my_buggy_program line 30.   Any quick tips on how to refer

Re: hash slice??

2008-11-10 Thread Chas. Owens
On Mon, Nov 10, 2008 at 09:52, Travis Thornhill <[EMAIL PROTECTED]> wrote: > Is there such a thing? > > I'm trying to take a HoH and make a reference to a sub-part of the hash. > > This doesn't work: > > my %sub_hash = $main_hash{'sub_hash'}; > > I get the following error: > Reference found where e

Re: hash slice??

2008-11-10 Thread Rob Coops
On Mon, Nov 10, 2008 at 3:52 PM, Travis Thornhill <[EMAIL PROTECTED] > wrote: > Is there such a thing? > > I'm trying to take a HoH and make a reference to a sub-part of the hash. > > This doesn't work: > > my %sub_hash = $main_hash{'sub_hash'}; > > I get the following error: > Reference found whe

Re: email validation

2008-11-10 Thread Dermot
2008/11/10 Rob Coops <[EMAIL PROTECTED]>: > On Mon, Nov 10, 2008 at 11:55 AM, Anusha Krishna chand < > [EMAIL PROTECTED]> wrote: > >> Hi All, >> How to validate an email id using perl regular expression . >> ... > > As for how to actually do that... there are a lot of different ways an

RE: String concatination.

2008-11-10 Thread Taylor, Andrew (ASPIRE)
Try: print "abc${string}zyx\n"; or print "abc".$string."zyx\n"; Cheers Andy -Original Message- From: Sureshkumar M (HCL Financial Services) [mailto:[EMAIL PROTECTED] Sent: 10 November 2008 15:34 To: beginners@perl.org Subject: String concatination. >Hi all, >I have a string like belo

RE: Using perl in a Bash-script to extract IP-addresses?

2008-11-10 Thread Stewart Anderson
> > JC Janos wrote: > > Hi, > > Hello, > > > I have a file containing IP addresses & ranges, their negations, and > > comments. E.g., > > > > 1.1.1.1 # comment A > > 2.2.2.2/29 # comment B > > !3.3.3.3 # comment C > > !4.4.4.4/28 # comment D > > > > I need to extract

Re: String concatination.

2008-11-10 Thread Rodrick Brown
my $string = "Hello"; $string .= " World"; print "Hello " . $string, "\n"; On Mon, Nov 10, 2008 at 10:34 AM, Sureshkumar M (HCL Financial Services) < [EMAIL PROTECTED]> wrote: > > Hi all, > > > >I have a string like below. > > > > $string="ABCD"; > > > > While printing , I have to in

Re: Using perl in a Bash-script to extract IP-addresses?

2008-11-10 Thread John W. Krahn
Stewart Anderson wrote: JC Janos wrote: I have a file containing IP addresses & ranges, their negations, and comments. E.g., 1.1.1.1 # comment A 2.2.2.2/29 # comment B !3.3.3.3 # comment C !4.4.4.4/28 # comment D I need to extract those IPs & range

String concatination.

2008-11-10 Thread Sureshkumar M (HCL Financial Services)
Hi all, I have a string like below. $string="ABCD"; While printing , I have to include some extra strings in prefix and suffix of the stringlike below... abcABCDxyz how do I do this.? actually I tried like below.. print "abc$sting\xyz"; B

RE: String concatination.

2008-11-10 Thread Mr. Shawn H. Corey
On Mon, 2008-11-10 at 15:52 +, Taylor, Andrew (ASPIRE) wrote: > Try: > > print "abc${string}zyx\n"; > > or > > print "abc".$string."zyx\n"; > Also: printf "abc%sxyz\n", $string; -- Just my 0.0002 million dollars worth, Shawn The map is not the territory, the dossier is not the p

RE: Using perl in a Bash-script to extract IP-addresses?

2008-11-10 Thread Stewart Anderson
> From: John W. Krahn [mailto:[EMAIL PROTECTED] > Sent: 10 November 2008 11:26 > To: Perl Beginners > Subject: Re: Using perl in a Bash-script to extract IP-addresses? > > Stewart Anderson wrote: > >> JC Janos wrote: > >>> > >>> I have a file containing IP addresses & ranges, their negations, and

Re: email validation

2008-11-10 Thread Rob Coops
On Mon, Nov 10, 2008 at 11:55 AM, Anusha Krishna chand < [EMAIL PROTECTED]> wrote: > Hi All, > How to validate an email id using perl regular expression . > First of all it would be nice to see what you tried so far with out that it seems like you are simply using thsi mailing list

Re: String concatination.

2008-11-10 Thread Mr. Shawn H. Corey
On Mon, 2008-11-10 at 21:04 +0530, Sureshkumar M (HCL Financial Services) wrote: > print "abc$sting\xyz"; print "abc${string}xyz"; -- Just my 0.0002 million dollars worth, Shawn The map is not the territory, the dossier is not the person, the model is not reality, and the universe is ind

email validation

2008-11-10 Thread Anusha Krishna chand
Hi All, How to validate an email id using perl regular expression .

Re: hash slice??

2008-11-10 Thread John W. Krahn
Travis Thornhill wrote: Is there such a thing? Yes there is. I'm trying to take a HoH and make a reference to a sub-part of the hash. This doesn't work: my %sub_hash = $main_hash{'sub_hash'}; I get the following error: Reference found where even-sized list expected at ./my_buggy_program li

Re: algorithm permute

2008-11-10 Thread Paul Lalli
On Nov 10, 9:15 am, [EMAIL PROTECTED] (Sharan Basappa) wrote: > Hi, > > After working fine with Algorithm::Permute module for weeks now, > suddenly I seem to be getting errors. > > The particular error is: > $ perl StTrAuto.pl > Can't locate Algorithm/Permute.pm in @INC (@INC contains: > /u/sharan/

Re: email validation

2008-11-10 Thread Rob Dixon
Anusha Krishna chand wrote: > > How to validate an email id using perl regular expression . This should help you. Rob use strict; use warnings; use Regexp::Common 'Email::Address'; my $email_re = $RE{Email}{Address}; foreach ( '"Anusha Krishna chand" <[EMAIL PROTECTED]>', '"R

Re: hash slice??

2008-11-10 Thread Rob Dixon
Travis Thornhill wrote: > > Is there such a thing? > > I'm trying to take a HoH and make a reference to a sub-part of the hash. > > This doesn't work: > > my %sub_hash = $main_hash{'sub_hash'}; > > I get the following error: > Reference found where even-sized list expected at ./my_buggy_pro

Re: Using perl in a Bash-script to extract IP-addresses?

2008-11-10 Thread Rob Dixon
John W. Krahn wrote: > > Why not just: > > ipaddy=`awk '{ print $1 }' ipin.txt` > > But that still doesn't get you a comma-separated list. Erm, a Perl list? Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Help understanding why the RE does not totally work

2008-11-10 Thread Rob Dixon
Rob Dixon wrote: > Jack Gates wrote: >> On Friday 26 September 2008 02:52:45 pm Rob Dixon wrote: >>> Jack Gates wrote: On Friday 26 September 2008 01:20:29 pm Rob Dixon wrote: > Jack Gates wrote: >> >> s!(<|)!$1\L$2\E!g; >> or >> s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g; >