Re: Learning Perl book, Chapter 1 example: open MAIL, |mail email_address doesn't work
On Tuesday, June 3, 2003 20:24 -0700 Richard E. Adams [EMAIL PROTECTED] wrote: I am working through the exercises in Chapter 1 of Learning Perl, Second Edition, O'Reilly publishers. I am using MacOS X (10.1.5), and Perl, v.5.6.0. An excerpt from one of the author's programs shows the following three lines: open MAIL, |mail YOUR_ADDRESS_HERE; print MAIL bad news: $someone guessed $someguess\n; close MAIL; ($someone and $someguess have been assigned appropriate values prior to the above three lines.) I suspect the above works fine in a typical UNIX environment, e.g., open MAIL, |mail [EMAIL PROTECTED]; print MAIL bad news: $someone guessed $someguess\n; close MAIL; How can I get the above to work on my Macintosh? (I don't get an error message, nor do I receive an email.) Any help would be greatly appreciated. To send mail, you need two components. A mail client (aka a mail user agent or MUA) and an SMTP program (aka a mail transport agent or MTA). The 'mail' program is an MUA. It passes messages to a local MTA for delivery. IIRC on OS X the MTA (sendmail) is installed, but not configured, so 'mail' successfully hands the message over to sendmail, which then neither knows what to do with it, nor knows how to warn you of the fact. -- David Cantrell Beekeeping is like being a lion tamer, but with smaller lions, and more of them. -- arp
Re: Learning Perl book, Chapter 1 example: open MAIL, |mail email_address doesn't work
On Wed, 2003-06-04 at 03:44, David Cantrell wrote: To send mail, you need two components. A mail client (aka a mail user agent or MUA) and an SMTP program (aka a mail transport agent or MTA). The 'mail' program is an MUA. It passes messages to a local MTA for delivery. IIRC on OS X the MTA (sendmail) is installed, but not configured, so 'mail' successfully hands the message over to sendmail, which then neither knows what to do with it, nor knows how to warn you of the fact. It's unfortunate that mail exits with 0, however. I was burned by this not very long ago (ran M-x mail in emacs for a quick mail, no error, never got there. Eventually I ran mailq and realized sendmail wasn't setup properly). It isn't mail's fault, though. sendmail returns with 0 as well. -Dan -- Dan Mills [EMAIL PROTECTED] All Minds!
Re: Learning Perl book, Chapter 1 example: open MAIL, |mail email_address doesn't work
On Wednesday, Jun 4, 2003, at 00:44 US/Pacific, David Cantrell wrote: On Tuesday, June 3, 2003 20:24 -0700 Richard E. Adams [EMAIL PROTECTED] wrote: I am working through the exercises in Chapter 1 of Learning Perl, Second Edition, O'Reilly publishers. I am using MacOS X (10.1.5), and Perl, v.5.6.0. An excerpt from one of the author's programs shows the following three lines: open MAIL, |mail YOUR_ADDRESS_HERE; print MAIL bad news: $someone guessed $someguess\n; close MAIL; [..] To send mail, you need two components. A mail client (aka a mail user agent or MUA) and an SMTP program (aka a mail transport agent or MTA). The 'mail' program is an MUA. It passes messages to a local MTA for delivery. IIRC on OS X the MTA (sendmail) is installed, but not configured, so 'mail' successfully hands the message over to sendmail, which then neither knows what to do with it, nor knows how to warn you of the fact. I know that Richard is working two sets of questions: a. how do I do this specific thing from learning perl b. how do I do email with perl May I highly recommend http://search.cpan.org/author/MARKOV/MailTools-1.58/ as an alternative for doing the specifics of emailing from perl. Sorting out sendmail is better these days but can be more complex than merely learning perl. I have some illustrations of email tricks in perl up at http://www.wetware.com/drieux/pbl/Other/email/ which I did on my little OSX box. As for the learning perl part, if he understands that the code in the book was essentially demonstrating invoking an external command, eg: '/usr/bin/mail' from perl, then he has the basics for doing one of the basic 'popen()' style solutions. But as we notice, the book presumes that everyone understands MTA/MTU and that by default 'sendmail' is an available service on the local host. ciao drieux ---
Re: CPAN/compilation issues
On Tuesday, June 3, 2003 20:48 -0500 Christopher D. Lewis [EMAIL PROTECTED] wrote: Dearest and most learned MacOS X / Perl worthies, We're not worthy! We're not worthy! I've had problems recently trying to update my Perl modules ... I got a lot of this sort of thing: t/06gzdopen.dyld: /usr/bin/perl Undefined symbols: _Perl_safefree _Perl_safemalloc _Perl_sv_2pv _Perl_sv_catpvn _perl_get_sv Did you, perchance, compile and install your own perl from sources without diddling the Makefile and what have you? -- David Cantrell Beekeeping is like being a lion tamer, but with smaller lions, and more of them. -- arp
Re: [MacOS X] consider useshrplib='false' by default
On Wed, 4 Jun 2003, Jarkko Hietaniemi wrote: Sounds reasonable to make the useshrplib to default to false (because of the significant startup slowness otherwise) and at the very least make it conditional (and I got a nod from Ed Moy of Apple, too). I had thought that the shared libperl provided by Apple was actually used by at least one other common application (and that not breaking that application was part of the background for Apple's original choice of installation location for their shared libperl). I've never used Mac OS X, so I don't have any firsthand knowledge either way. So I did (change #19681). Since useshrplib='false' is the default anyway, I suggest the following minor editorial change: diff -u perl-5.8.x/hints/darwin.sh perl-5.8.x-andy/hints/darwin.sh --- perl-5.8.x/hints/darwin.sh Wed Jun 4 02:40:33 2003 +++ perl-5.8.x-andy/hints/darwin.sh Wed Jun 4 11:18:23 2003 @@ -141,9 +141,7 @@ ldlibpthname='DYLD_LIBRARY_PATH'; # useshrplib=true results in much slower startup times. -case $useshrplib in -'') useshrplib='false' ;; -esac +# 'false' is the default value. Use Configure -Duseshrplib to override. cat UU/archname.cbu 'EOCBU' # This script UU/archname.cbu will get 'called-back' by Configure -- Andy Dougherty [EMAIL PROTECTED]