On Fri, 9 Aug 2002, Mat Harrison wrote: > hi, i am trying to get an email to feed a perl script. > > I have aliased the email address to pipe to the program but nothing. What > variables should I be looking in to get the data that is piped? for example, > command line arguments are in @ARGV. Is it something to do with $&? > > I need to be able to process the body of the message a line at a time, with a > (theoretically) unlimited number of lines.
When email message is piped into your script you should be reading from the standard input. > > Also, I know it is slightly of topic but could someone just run by me how to > pipe a sendmail address to a perl script just for confirmation, off list if > necessary? Your .procmailrc should look like this :0 * ^From.*<your_search_pattern> | <your_perl_script> your_perl_script to print the message to a file mail.txt open (MAILTEXT, "mail.txt") or die "...."; while (<STDIN>) { print MAILTEXT; } close (MAILTEXT); > > > cheers guys > > ------------------------------------------------- > This mail sent through IMP: http://horde.org/imp/ > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]