sorry about that typing mistake ________________________________________ Rakhitha Karunarathne Web Master www.Ad-Man.tk - Free Unlimited Banner Rotators ________________________________________
> ----- Original Message ----- > From: "Durai" <[EMAIL PROTECTED]> > To: "LRMK" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Tuesday, May 18, 2004 12:49 PM > Subject: Re: Newbie: Perl reg. expression - Correction > > > > Hi, > > > > It works fine after I change the following line: > > > > my @parts = parts(/\s+/); > > > > to > > > > my @parts = split(/\s+/); > > > > Thanks for your help. > > > > Thanks, > > Durai. > > > > ----- Original Message ----- > > From: "LRMK" <[EMAIL PROTECTED]> > > To: "Durai" <[EMAIL PROTECTED]> > > Cc: <[EMAIL PROTECTED]> > > Sent: Tuesday, May 18, 2004 12:00 PM > > Subject: Re: Newbie: Perl reg. expression - Correction > > > > > > > My previous mail has a small problem > > > this one should fix it > > > > > > > > > open FILE, "test.txt" or die "Can't open file!: $!"; > > > while( <FILE> ) > > > { > > > > > > my @parts = parts(/\s+/); > > > foreach (@parts){ > > > if (/^(\d+\.\d+\.\d+\.\d+)$/){ > > > print "$1\n"; > > > } > > > } > > > } > > > close FILE; > > > ________________________________________ > > > Rakhitha Karunarathne > > > Web Master > > > www.Ad-Man.tk - Free Unlimited Banner Rotators > > > ________________________________________ > > > > > > > > > > > > ----- Original Message ----- > > > From: "Durai" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Tuesday, May 18, 2004 11:54 AM > > > Subject: Newbie: Perl reg. expression > > > > > > > > > > Hello All, > > > > > > > > open FILE, "test.txt" or die "Can't open file!: $!"; > > > > while( <FILE> ) > > > > { > > > > print if /(\d+\.\d+\.\d+\.\d)/; > > > > } > > > > close FILE; > > > > > > > > It gives the following output: > > > > > > > > # prevent Apache from glomming onto all bound IP addresses (0.0.0.0) > > > > #Listen 12.34.56.78:80 > > > > # e.g., www.apache.org (on) or 204.62.129.132 (off). > > > > > > > > I want only a word which contains IP address only not with port and > > > others.. > > > > For example, Need like: 204.62.129.132 not > > (0.0.0.0),12.34.56.78:80,.. > > > . > > > > > > > > Regs, > > > > durai. > > > > > > > > > > > > > > > > > > > > --- > > > > Outgoing mail is certified Virus Free. > > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > > Version: 6.0.684 / Virus Database: 446 - Release Date: 5/14/2004 > > > > > > > > > > > > -- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > > > > > > > > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.684 / Virus Database: 446 - Release Date: 5/14/2004 > > > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > > > > > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>