[boulder.pm] file handle and pipe
Luke Palmer
fibonaci at babylonia.flatirons.org
Sat Jun 29 01:12:00 CDT 2002
On Fri, 28 Jun 2002, j davis wrote:
> Hello,
> Im a newbie. I have a var. that holds the contents of a email. I am trying
> to send the email using sendmail like this....
>
> `/bin/echo $in{content} | sendmail jd\@taproot.bz`;
Should work like this:
`/bin/echo '$in{content}' | sendmail jd\@taproot.bz`;
(le singel qeuotes)
> doesnt work , friend suggested this.....
>
> open MAIL, "|/usr/bin/sendmail jd\@taproot.bz";
> print MAIL "$in{content}";
> close MAIL;
>
Oddly enough, this should work. Are you sure something isn't going wrong
somewhere else in your program?
> cant seem to make this work either but i really like the idea of it.
> can i open a file handel and pipe info into a program like
> im trying above?
Yes. That's precisely how you do it, unless I'm having some marvelously
stupid brainfart at the moment. If you don't figure it out, send in the
whole program and I'll look over it (unless it's giant).
P.S. For those of you who couldn't make it, YAPC was incredible!
Extremely fun and informative!! Go next year!
Luke
More information about the Boulder-pm
mailing list