Thanks a lot for your help.I have the last problem to resolve. The script: ------------------------------------------------------------------- #!/usr/bin/perl $_ = q( Apr 22 01:03:01 pandora ipop3d[28245]: Login user=holy00 Apr 21 01:03:01 pandora ipop3d[28245]: Login user=holy01 Apr 21 01:03:01 pandora ipop3d[28245]: Login user=holy05 Apr 21 01:03:01 pandora ipop3d[28245]: Login user=holy01 Apr 21 01:03:01 pandora ipop3d[28245]: Login user=holy00 Apr 21 01:03:01 pandora ipop3d[28245]: Login user=holy02 Apr 21 01:03:01 pandora ipop3d[28245]: Login user=holy05 Apr 21 01:03:01 pandora ipop3d[28245]: Login user=holy01 Apr 21 01:03:01 pandora ipop3d[28245]: Login user=holy00 ); for (split/\n/) {s~(.+user=)(.+)~$2~; $users{$_} = x} for (sort keys %users) {print "$_$/"} ---------------------------------------------------------------- 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? Another times many thanks.