[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 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>