On 02/11/2016 22:14, Andy Bach wrote:
#!/usr/bin/perl
my $vacation_forward = 'vacat...@domain.com <http://domain.com>';
open(OUT, "|/usr/sbin/sendmail $vacation_forward") or die ("Can't
sendmail - $!");
my $email_addr_to = '';
while ( <>) {
$email_addr_to = $1 if /^To: (.*)$/;
print OUT $_;
}
close (OUT);
if ($email_addr_to) {
print "$email_addr_to\n";
}
Thank you
Nice and simple and thanks for the explanation it helps me understand.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/