Re: Delete a particular line from file

2007-05-17 Thread sivasakthi
Yes i got it.. it works fine well. Thanks a lots.. Siva > Hello, > > Here you may try to do, > while() { > chomp; > $arrskip{$_} = 1; > } > > chomp would remove newline symbol (on Unix it's "\n") reading from the > original file. > -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: Delete a particular line from file

2007-05-17 Thread Jeff Pang
sivasakthi 写道: open FF, "/tmp/userip.txt" or die $!; $arrskip{$_}= 1 while (); Hello, Here you may try to do, while() { chomp; $arrskip{$_} = 1; } chomp would remove newline symbol (on Unix it's "\n") reading from the original file. -- http://home.arcor.de/jeffpang/ -- To unsubsc

Re: Delete a particular line from file

2007-05-17 Thread sivasakthi
On Tue, 2007-05-15 at 12:25 +0800, Jeff Pang wrote: > sivasakthi 写道: > > Hi, > > > > I have used the file in perl, file contains like that, > > > > 1176369096.111468 172.16.2.80 TCP_MISS/200 9629 > > 1176378643.614458 172.16.2.80 TCP_MISS/200 9626 > > 1176378681.984662 172.16.2.75 T

Re: Delete a particular line from file

2007-05-17 Thread sivasakthi
On Thu, 2007-05-17 at 07:50 -0400, Chas Owens wrote: > Did you type > > OUTER: > while() { > > or just > > while () { I have used as, OUTER: while () { Thanks, Siva -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Delete a particular line from file

2007-05-17 Thread Chas Owens
On 5/17/07, sivasakthi <[EMAIL PROTECTED]> wrote: snip > OUTER: > while() { >my ($time, $lport, $ip, $stats, $rport) = split; >for my $skip_ip (@ip) { > next OUTER if $ip eq $skip_ip; >} ># using those values above to create hash >#based on what form of hash you needed.

Re: Delete a particular line from file

2007-05-17 Thread Penny Y. Hohimer
> On Wed, 2007-05-16 at 08:01 -0400, Chas Owens wrote: > >> >> Assuming that you have a list of IP addresses you want to skip in @ip, >> you could say >> >> #!/usr/bin/perl >> >> use strict; >> use warnings; >> >> OUTER: >> while() { >>my ($time, $lport, $ip, $stats, $rport) = split; >>for

Re: Delete a particular line from file

2007-05-16 Thread sivasakthi
On Wed, 2007-05-16 at 08:01 -0400, Chas Owens wrote: > > Assuming that you have a list of IP addresses you want to skip in @ip, > you could say > > #!/usr/bin/perl > > use strict; > use warnings; > > OUTER: > while() { >my ($time, $lport, $ip, $stats, $rport) = split; >for my $skip_ip

Re: Delete a particular line from file

2007-05-16 Thread Chas Owens
On 5/16/07, sivasakthi <[EMAIL PROTECTED]> wrote: Suppose i have checked the group of I/P addresses for deleting opting then what should i do?? Is there any inbuilt function there for that requirement?? snip > while() { > my ($time,$lport,$ip,$stats,$rport) = split; > next if $ip eq '1

Re: Delete a particular line from file

2007-05-16 Thread Jeff Pang
sivasakthi 写道: Suppose i have checked the group of I/P addresses for deleting opting then what should i do?? We don't know what you should do.Only you yourself could konw what you should do.Can you describe the questions more clearly? -- Jeff Pang http://home.arcor.de/jeffpang/ -- To unsub

Re: Delete a particular line from file

2007-05-16 Thread sivasakthi
Suppose i have checked the group of I/P addresses for deleting opting then what should i do?? Is there any inbuilt function there for that requirement?? On Tue, 2007-05-15 at 12:25 +0800, Jeff Pang wrote: > sivasakthi 写道: > > Hi, > > > > I have used the file in perl, file contains like that, >

Re: Delete a particular line from file

2007-05-14 Thread Jeff Pang
sivasakthi 写道: > Hi, > > I have used the file in perl, file contains like that, > > 1176369096.111468 172.16.2.80 TCP_MISS/200 9629 > 1176378643.614458 172.16.2.80 TCP_MISS/200 9626 > 1176378681.984662 172.16.2.75 TCP_MISS/200 9626 > 1176436396.304 1142 172.16.2.80 TCP_MISS/200 1

Delete a particular line from file

2007-05-14 Thread sivasakthi
Hi, I have used the file in perl, file contains like that, 1176369096.111468 172.16.2.80 TCP_MISS/200 9629 1176378643.614458 172.16.2.80 TCP_MISS/200 9626 1176378681.984662 172.16.2.75 TCP_MISS/200 9626 1176436396.304 1142 172.16.2.80 TCP_MISS/200 13281 1176436397.228916 172