on Mon, 06 May 2002 09:57:02 GMT, [EMAIL PROTECTED] (En
Prashant) wrote: 

> I had been assigned a work of extracting data from a text file.The
> text file has these datas
> 193.9.200.123,prashant , ,y,22/04/02,12:09:43, , ,
> ,http://rediffmail.com,,,,,,,,.
> I have to fetch IP address,uesr name,date,time of log on,site or
> page visited.

If you are sure that your data is behaving, you could use:

    open FH, "<$yourfile" or die "Cannot open $yourfile: $!";
    while (<FH>) {
        my ($ip, $user, $date, $time, $url) = (split /,/)[0,1,4,5,9];
        # Do your stuff with the data
    }
    close FH;

-- 
felix

 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to