<font size=2 face="sans-serif">Hey,</font>
<br>
<br><font size=2 face="sans-serif">Not sure what your .msf file should
look like but I mocked up a file like:</font>
<br><font size=2 face="sans-serif">your message could not be delivered
: andy@wiwb';</font>
<br>
<br><font size=2 face="sans-serif">and get:</font>
<br><font size=2 face="sans-serif">Apparent undelivered email your message
could not be delivered FOUND in line 1 of Inbox.msf</font>
<br><font size=2 face="sans-serif"> your message could not be delivered
: andy@wiwb'; </font>
<br><font size=2 face="sans-serif">This line contains the next email address
your message could not be delivered : andy@wiwb'; </font>
<br>
<br><font size=2 face="sans-serif">so *if* your .msf format is like that,
then is should work. You're doing a lot of extra work though - for
one, if you know the name of the file, you don't need to do the opendir/readir
stuff (unless you're planning to look for other files). The:</font>
<br><font size=2 face="sans-serif">
# look for the email address that comes after</font>
<br><font size=2 face="sans-serif">
my $bad_email = '\@';</font>
<br><font size=2 face="sans-serif">
if (/\b$bad_email\b/i) {</font>
<br>
<br><font size=2 face="sans-serif">appears you've pared things down (you
don't need the backslash inside single quotes) as /@/ should match anywhere
/\b@\b/ would, I believe. This would normally be where you capture
the info:</font>
<br><font size=2 face="sans-serif">
# look for the email address that comes after</font>
<br><font size=2 face="sans-serif">
my $bad_email = '@';</font>
<br><font size=2 face="sans-serif">
if (/(\S+$bad_email\S+)/i) {</font>
<br>
<br><font size=2 face="sans-serif">gets all the non-whitespace chars on
either side of the '@' into $1.</font>
<br>
<br><font size=2 face="sans-serif">a</font>
<br><font size=2 face="sans-serif">----------------------<br>
Andy Bach<br>
Systems Mangler<br>
Internet: andy_bach@wiwb.uscourts.gov<br>
Voice: (608) 261-5738; <br>
Cell: (608) 658-1890<br>
<br>
The bureaucracy is expanding to meet the needs of an expanding bureaucracy.</font>