From: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> wrote:
: ok here it what I did and it is emailing sporadically or not : at all??? : Also it is not placing the array data into the email body??? : it is like the if clause it not working. : : thank you! Isolate just the sendmail parts. And see if you get a better result. If this tests okay, your problem is in the rest of your code. use Mail::Sendmail; my @ftypes = ( 'this is just a test', 'in the event of a real emergency', 'open a window and jump', ); my %mailman = ( From => 'EDM01 <[EMAIL PROTECTED]>', To => 'Derek Smith <[EMAIL PROTECTED]>', Subject => "Foreign Tapes Found, now attmepting to label" , Message => print "@ftapes" ); sendmail( %mailman ) or die $Mail::Sendmail::error; : ## Traverse through array and play with data : : open (OUT, ">$foreigntapes") || die "could not open file:$!"; : my @ftapes = grep s/^barcode=//, `evmvol -w label_state=1`; : print OUT "@ftapes"; : if ( -s OUT ) { : my %mailman = ( From => 'EDM01 <[EMAIL PROTECTED]>', : To => 'Derek Smith : <[EMAIL PROTECTED]>', : Subject => "Foreign Tapes Found, now : attmepting to label" , : Message => print OUT "@ftapes" ); BTW, shouldn't that be print "@ftapes"? You have already printed it to OUT. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>