RE: sending an email to a email address after a perl operation
Hi, Howdy again, still working on this huh? I have a script named renamer.pl that takes images from a directory and renames images and stores image meta information in a mysql. i also have a script that sends an email notification when excecuted to a desired email address. is there away that i could combine the 2 scripts together, so when the meta information are inserted into MySQL, an email is sent to me. Sure. #!/usr/bin/perl ...code that inserts into mysql ... ...code that sends mail ... Ta Da! One script DMuey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sending an email to a email address after a perl operation
Hi Dan Hey, reply to the list not just me. yeh still here, back from a small break. just want to finish it!!. i tried this and this is what i got: Global symbol $smtp requires explicit package name at Make $smtp = ... my $smtp = ... There was a thread earlier today about namespaces. Check out the archive it was quite informative. rename.pl line 140. Global symbol $smtp requires explicit package name at rename.pl line 143. Global symbol $smtp requires explicit package name at rename.pl line 151. Global symbol $smtp requires explicit package name at rename.pl line 152. Global symbol $smtp requires explicit package name at rename.pl line 155. Global symbol $smtp requires explicit package name at rename.pl line 159. Global symbol -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sending an email to a email address after a perl operation
thanks Dan, sorry for forgetting to send to list. the email script works alone, as it is, so maybe it is something else. Regards, Mel From: Dan Muey [EMAIL PROTECTED] To: mel awaisi [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: RE: sending an email to a email address after a perl operation Date: Fri, 4 Apr 2003 17:10:10 -0600 Hi Dan Hey, reply to the list not just me. yeh still here, back from a small break. just want to finish it!!. i tried this and this is what i got: Global symbol $smtp requires explicit package name at Make $smtp = ... my $smtp = ... There was a thread earlier today about namespaces. Check out the archive it was quite informative. rename.pl line 140. Global symbol $smtp requires explicit package name at rename.pl line 143. Global symbol $smtp requires explicit package name at rename.pl line 151. Global symbol $smtp requires explicit package name at rename.pl line 152. Global symbol $smtp requires explicit package name at rename.pl line 155. Global symbol $smtp requires explicit package name at rename.pl line 159. Global symbol -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Surf together with new Shared Browsing http://join.msn.com/?page=features/browsepgmarket=en-gbXAPID=74DI=1059 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sending an email to a email address after a perl operation
mel awaisi wrote: There was a thread earlier today about namespaces. Check out the archive it was quite informative. rename.pl line 140. Global symbol $smtp requires explicit package name at rename.pl line 143. Global symbol $smtp requires explicit package name at rename.pl line 151. Global symbol $smtp requires explicit package name at rename.pl line 152. Global symbol $smtp requires explicit package name at rename.pl line 155. Global symbol $smtp requires explicit package name at rename.pl line 159. Global symbol Hi Mel, Since your two scripts were developoed separately, you might want to add use strict; to emailtest.pl, and work on that until it compiles cleanly. These errors indicate that you are not declaring your variables properly. Once that script compiles cleanly, you could integrate the code from renamerr.pl into it. I would say that you are also pushing the limits of what you can sensibly do with scripting. If you wish to be able to develop complicated processes, you should really learn how to write subroutines and functions. perldoc perlsub perldoc perlref perldoc perlreftut Hint: If the code in renamer was properly packaged within functions, you would not have to cut and paste code. You could use renamer as a module, and call functions from it in other scripts. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]