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,
> > 
> > 1176369096.111    468 172.16.2.80 TCP_MISS/200 9629 
> > 1176378643.614    458 172.16.2.80 TCP_MISS/200 9626 
> > 1176378681.984    662 172.16.2.75 TCP_MISS/200 9626 
> > 1176436396.304   1142 172.16.2.80 TCP_MISS/200 13281 
> > 1176436397.228    916 172.16.2.99 TCP_REFRESH_HIT/200 7521 
> > 1176436469.060   1470 172.16.2.80 TCP_MISS/200 5822 
> > 
> > I have need to split the each column in to separate hash value,before
> > that i need to delete the particular user details from the file.For
> > example if a line contains the user I/P  of 172.16.2.80 then i should
> > delete that whole line and then split in to separate column. For that
> > what should i do??
> > 
> 
> while(<FILE>) {
>     my ($time,$lport,$ip,$stats,$rport) = split;
>     next if $ip eq '172.16.2.80';
>     # using those values above to create hash,based on what form of hash
> you needed.
> }
> 

Reply via email to