Re: perl with sendmail

Daniel Sherer (shererd@std.teradyne.com)
Tue, 09 Jun 1998 09:56:54 -0700


perl@digigate.net writes:
> Anyone knows how i can pipe an email message to a perl script.
> 
> In the sendmail aliases file i made the following:
> 
> test:        "|/usr/testing/tes.pl"
> 
> now how can i read the mail from the script ?

David,

In perl, the easiest way to read the standard input is:

	while (<>) {
		# do something here with $_
	}



Daniel