Results 1 to 1 of 1

Thread: Mail list

  1. #1
    Join Date
    Dec 2003
    Location
    Ogden Utah
    Posts
    34

    Red face Unanswered: Mail list

    hello:

    I am in a UNIX environment and I have a file named "mailout" that I am reading with the program below.What I really want to do is mail the report to my email address without echoing it to my screen.

    Looking forward to your replies.


    #--------------------------------------------------------
    # VARIABLES #
    #--------------------------------------------------------

    $file="/some/directory/where/file/found/mailout";
    $date=`date`;

    #--------------------------------------------------------
    # PROGRAM #
    #--------------------------------------------------------

    open (FA, $file);
    while (<FA>){
    split (/\|/);
    $vname = $_[7] ;
    $vlist{$vname} +=1 ;
    }
    print "$date\n";
    foreach $vname (sort (keys %vlist)) {
    print ("$vname: $vlist{$vname}\n");
    }
    open MAIL, "|mail myemailaddress";{
    print MAIL "";
    close MAIL;
    Last edited by mvillan; 04-29-04 at 13:35.
    mvilla

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •