At 5:24 pm +0000 24/4/02, <[EMAIL PROTECTED]> wrote: | Thanks a lot for your help.I have the last problem to resolve. | The script[..] | is perfect,but I didn't copy the last part of the line: | ---------------------------------------------------------------- | Apr 14 17:24:45 pandora ipop3d[6577]: Login user=ct000512 | host=ppp-62-11-119-90.dialup.tiscali.it | ---------------------------------------------------------------- | How can extract now just the user name? | And how is possible to use a big file(maillog) instead of the log lines?
#______Login details with duplicated users $log_content = q(anytext user=ct000512 anytext anytext user=ct000513 anytext anytext user=ct000512 anytext anytext user=ct000515 anytext anytext user=ct000512 anytext anytext user=ct000512 anytext); #______Write it to a file for testing $path_to_maillog = "maillog"; open LOG, ">$path_to_maillog" or die $!; print LOG $log_content; close LOG; #______Read the file line by line:- open LOG, "$path_to_maillog" or die $!; while (<LOG>) { s~ .+ user= (\S+) .+ ~$+~x; $_{$_} = x ;} for (sort keys %_) {print} Command-click on "open", "s", "while" etc. to learn more. JD PS. I tried a while ago to create an account with Tiscali for when I'm in Italy (TO), gave them my Codice Fiscale and everything, but it failed. Can you fix it for me if I give you the details?