masalachol
Technical User
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;
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;