HI, I have the attached script which reads the input text file of the form: # cat rpcinfo.txt
program vers proto port service response 100000 4 tcp 111 portmapper program 100000 version 4 ready and waiting 100000 3 tcp 111 portmapper program 100000 version 3 ready and waiting 100000 2 tcp 111 portmapper program 100000 version 2 not ready The input text file describes the output from another script detailing the output from the rpcinfo UNIX utility. In the attached script, I would like to read the lines matching the string "not ready" and sends an e-mail notification to the sysadmin detailing the process id and service name that matched the string "not ready". However, the script produce the following syntax error below, when it comes to the SENDMAIL part in the sub-routine sendMail: [EMAIL PROTECTED] ./summer.pl Bareword found where operator expected at ./summer.pl line 78, near "print SENDMAIL "TO" (Might be a runaway multi-line "" string starting on line 77) (Do you need to predeclare print?) syntax error at ./summer.pl line 78, near "print SENDMAIL "TO" Backslash found where operator expected at ./summer.pl line 78, near "$rpcAdmList \" (Missing operator before \?) String found where operator expected at ./summer.pl line 79, near "print SENDMAIL "" (Might be a runaway multi-line "" string starting on line 78) (Missing semicolon on previous line?) Bareword found where operator expected at ./summer.pl line 79, near "print SENDMAIL "Subject" (Do you need to predeclare print?) String found where operator expected at ./summer.pl line 80, near "print SENDMAIL "" (Might be a runaway multi-line "" string starting on line 79) (Missing semicolon on previous line?) Bareword found where operator expected at ./summer.pl line 80, near "print SENDMAIL "Date" (Missing operator before Date?) Backslash found where operator expected at ./summer.pl line 80, near "`date` \" (Missing operator before \?) String found where operator expected at ./summer.pl line 81, near "print SENDMAIL "" (Might be a runaway multi-line "" string starting on line 80) Bareword found where operator expected at ./summer.pl line 81, near "print SENDMAIL "PROGRAM" (Do you need to predeclare print?) Backslash found where operator expected at ./summer.pl line 81, near "PROGRAM\" Backslash found where operator expected at ./summer.pl line 81, near "t\" Backslash found where operator expected at ./summer.pl line 81, near "tPORT\" Backslash found where operator expected at ./summer.pl line 81, near "t\" Backslash found where operator expected at ./summer.pl line 81, near "tSERVICE\" Backslash found where operator expected at ./summer.pl line 81, near "t\" Backslash found where operator expected at ./summer.pl line 81, near "tRESPONSE\" Backslash found where operator expected at ./summer.pl line 81, near "t\" Backslash found where operator expected at ./summer.pl line 81, near "t\" String found where operator expected at ./summer.pl line 82, near "print SENDMAIL "" (Might be a runaway multi-line "" string starting on line 81) (Missing semicolon on previous line?) Scalar found where operator expected at ./summer.pl line 82, at end of line (Do you need to predeclare print?) Backslash found where operator expected at ./summer.pl line 82, near "$portNum\" (Missing operator before \?) Backslash found where operator expected at ./summer.pl line 82, near "t\" Backslash found where operator expected at ./summer.pl line 82, near "$portNum\" (Missing operator before \?) Backslash found where operator expected at ./summer.pl line 82, near "t\" Backslash found where operator expected at ./summer.pl line 82, near "$service\" (Missing operator before \?) Backslash found where operator expected at ./summer.pl line 82, near "t\" Backslash found where operator expected at ./summer.pl line 82, near "$progResp\" (Missing operator before \?) Backslash found where operator expected at ./summer.pl line 82, near "t\" Backslash found where operator expected at ./summer.pl line 82, near "t\" String found where operator expected at ./summer.pl line 82, at end of line (Missing semicolon on previous line?) Can't find string terminator '"' anywhere before EOF at ./summer.pl line 82. I was wondering if anyone could tell me where did I go wrong & how do I resolve such errors? Any examples would indeed be helpful. Thanks in advance. <<summer.ZIP>>
summer.ZIP
Description: Zip compressed data
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]