great thank you! I will try that and let you know. The reason for the non-indentation is b/c of a cut and paste, the production code is indented. Sorry!
Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams "Charles K. Clarkson" <[EMAIL PROTECTED]> 06/02/2004 09:19 AM To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> cc: Subject: RE: using Mail::Sendmail [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> wrote: : All, : : I am getting these errors... any ideas? : : Global symbol "%mail" requires explicit package name at : foreign_tape_ck.pl line. : Bareword "EO_SIG" not allowed while "strict subs" in use at : foreign_tape_ck.pl . foreign_tape_ck.pl had compilation errors. [snip] : if ( -s OUT ) { : my %mailman = ( From => 'EDM01 <[EMAIL PROTECTED]>', : To => 'Derek Smith <[EMAIL PROTECTED]>', : Subject => "Foreign Tapes Found" ); : sendmail (%mail) or die $Mail::Sendmail::error; : print %mailman <<EO_SIG : EDM foreign tapes were found now attempting to label : EO_SIG; : foreach $_ (@ftapes) { : print $_; : #`evmlabel -l st_9840_acs_0 -t 9840S -b$_` : } : close (OUT); : } Let's rewrite this with some indentation. Doesn't this seem a little easier to read? Try adding white space to your scripts and separate lines that do different things. if ( -s OUT ) { my %mailman = ( From => 'EDM01 <[EMAIL PROTECTED]>', To => 'Derek Smith <[EMAIL PROTECTED]>', Subject => 'Foreign Tapes Found', ); sendmail( %mail ) or die $Mail::Sendmail::error; print %mailman <<EO_SIG EDM foreign tapes were found now attempting to label EO_SIG; foreach $_ (@ftapes) { print $_; #`evmlabel -l st_9840_acs_0 -t 9840S -b$_`; } close OUT; } Your errors are on the following lines: sendmail (%mail) or die $Mail::Sendmail::error; print %mailman <<EO_SIG EDM foreign tapes were found now attempting to label EO_SIG; %mail has not been defined. You probably want %mailman. Why use a HERE doc for a single line? sendmail( %mailman ) or die $Mail::Sendmail::error; print %mailman, "\nEDM foreign tapes were found now attempting to label\n"; The foreach would be better written as this. Though I don't think perl will complain. foreach ( @ftapes ) { print $_; #`evmlabel -l st_9840_acs_0 -t 9840S -b$_` } HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328