I don't know where to start with this one.



I need some advice as to how to approach this problem.

I've got a mail alias file, space delimited and sorted on the second
column like:

a_james@xxxxxxxxxxx ajames@xxxxxxxxxxxxxxxx
david_williams@xxxxxxxxxxx dwilliams@xxxxxxxxxxxxxxxx
j_smith@xxxxxxxxxxx jsmith@xxxxxxxxxxxxxxxx
joe_smith@xxxxxxxxxxx jsmith@xxxxxxxxxxxxxxxx
zach_taylor@xxxxxxxxxxx ztaylor@xxxxxxxxxxxxxxxx

I need to send an email to each of the addresses on the right. I
could send this line by line but then jsmith would get two emails,
when I want to send one. The second thing I need to do is grab all
these addresses to use as variables in the body of the email that will
get sent.

The email would read something like:
----------------------------------------------------------------------------------------------------------------------
These are your email aliases: j_smith@xxxxxxxxxxx, joe_smith@xxxxxxxxxxx
This is your official email address: jsmith@xxxxxxxxxxxxxxxx
----------------------------------------------------------------------------------------------------------------------

The part I need help with is how to grab lines in the file with the
same email address (address on the right) and treat them as "one
record" as well as treat those with a single email address as one
record?

Maybe another way to state this is how do I get the lines with
jsmith@xxxxxxxxxxxxxxxx into an array, process that, and then grab a
line with a single address like ztaylor@xxxxxxxxxxxxxxxx and process
that?

Thanks for any pointers. I'd include some code but I don't even know
where to start.
Kent
.



Relevant Pages

  • Re: I dont know where to start with this one.
    ... I've got a mail alias file, space delimited and sorted on the second ... These are your email aliases: ... The part I need help with is how to grab lines in the file with the ... record" as well as treat those with a single email address as one ...
    (perl.beginners)
  • Re: I dont know where to start with this one.
    ... > I've got a mail alias file, space delimited and sorted on the second ... The second thing I need to do is grab all ... is just one point I'm stuck on, how to grab the username portion of ... I'm able to get the username of ...
    (perl.beginners)