proggybilly
Programmer
I have a script I am writing, keep in mind I am a major newbie, which pulls the lines out of a log file containing the word LOGIN.
Each line has an email address with in it.
I am using this code:
To pull the data out of the string starting at user till the end of the line. An example line would look like this:
Jun 18 10:44:06 server pop3d: LOGIN, user=myuserid@mydomain.com, ip=[::ffff:XXX.XXX.XXX.XXX]
What i need to do is pull the username part of the email address out of that line.
Can anyone please lend a hand with this?
Each line has an email address with in it.
I am using this code:
Code:
$zuser = substr $mail_line, index($mail_line,'user');
To pull the data out of the string starting at user till the end of the line. An example line would look like this:
Jun 18 10:44:06 server pop3d: LOGIN, user=myuserid@mydomain.com, ip=[::ffff:XXX.XXX.XXX.XXX]
What i need to do is pull the username part of the email address out of that line.
Can anyone please lend a hand with this?