"Uri Guttman" <u...@stemsystems.com> writes:

> yes. it will be more portable (you have sendmail's path hard wired
> and it varies). they can use other mailers (i have qmail). they can
> use smtp directly to your isp's server (not calling a local
> server). they have more options and are easier to understand. they
> don't use global filehandles (well, you could use a lexical handle
> too.

At first, I wasn't concerned about portability, since the script is
only intended for use on my home machine by me, but then with your
prompting I realized;  I might have changed MTA 5-6 yrs from now
myself.  And could very likely still be using this script.

I hadn't ever thought about portability in quite that way before.
Always thinking in terms of other machines, remotes, other users etc.

>   HP> Not sure what you are suggesting to do there.  I mean other than ditch
>   HP> the code in favor of a module.  Do you mean to put the `die' after the
>   HP> CLOSE?
>
> either is better. your code needs to check the close in case your open
> to sendmail fails. and use a module instead for the whole thing.
>
>   HP> Even without that though, wouldn't any errors at CLOSE still print to
>   HP> stderr?
>
> what errors? perl doesn't print system errors, it returns them in $!

Aack... what a dope... yeah of course. ... its a system call

Thanks


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to