in reply to call a script via an email

Yes, yes, it's entirely possible with Perl.

There are two options. You could write a simple daemon (to run at all times) to monitor a POP email account. Or you could have a script run at scheduled times (via crontab) to do the same thing.

If a certain email message is detected, you can do whatever your soul wishes, really. There's a number of modules that you could find on CPAN that will help you check a POP account from your script, parse messages, etc.

Your script may look as simple as this (read inline comments for more info):
use Mail::POP3Client; $pop = new Mail::POP3Client( USER => "me", PASSWORD => "mypassword", HOST => "pop3.do.main" ); my $specific_email_subject = "Parse by script"; my $parser_script = "email_parse.pl"; for ($i = 1; $i <= $pop->Count(); $i++) { foreach ( $pop->Head($i) ) { if (/^Subject:\s+($specific_email_subject)/i) { # Special email detected!!! # open a 'pipe' to the script that will parse/process # this email message body. open(PARSER,">$parser_script |"); # send email body to the script (will receive # it via STDIN print PARSER $pop->Body($i); # close pipe (end 'transmission') close(PARSER); } } }
(note: not tested).

UPDATE: added the sample script.

_____________________

signature is under repair