perl pipe reading

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I pay for web hosting. One of the things I get with this is email. With
that email I can set boolean rules that will forward email that matches
those rules to a specific address including a perl file. The address
you give is something like "|/home/my_account/www/cgi-bin/". I
have gotten the perl file to activate on the reception of an email
address, but I don't know how to access the email that activated that
perl file. I have read up a little bit on perl pipe reading, but I find
it confusing. How do could I access this email?

Re: perl pipe reading

lambelly wrote:
Quoted text here. Click to load it

Read from STDIN.

open( my $log, '>>', '/tmp/my_account.log') or die "Can't open
/tmp/my_account.log: $!";
while ( <> ) { print $log; }
close( $log );

However, your first stop should be with the people you're paying for
support. They, not us, should be the ones to help you understand how you
can filter your E-Mail with the tools they provide and support.

Also, while there are plenty of modules on CPAN to help parse your
E-Mail, using rules with filter (man filter) or possibly procmail (man
procmail) is typically more than enough and you likely won't need your
own script.

Site Timeline