procmail
[Top] [All Lists]

RE: Q on procmail piped to perl - solved!

1999-03-28 23:07:21
In case anyone is interested.

It seems that the recipe and the perl script was working all the time.

It's just that the perl script was dumping its .out file in the $HOME
directory and not in the scripts directory, as I thought it should.

I wish to extend my gratitude to all those who ventured solutions and
de-bugging techniques.

So, if any one wants to know, this is my procmail recipe and the perl
script.

Walter

============================

    :0
    * ^TO()perl(_at_)tscinternet\(_dot_)com
    | $HOME/vmail/perl/test.pl

============================

#! /usr/local/bin/perl5 -w

$/ = undef;                             # undefine line terminator so we
    my $message = <STDIN>;              # slurp in the whole thing at once,
$/ = "\n";                              # then redefine the line terminator

open(LOG, ">>./test.out") or die "$0: Unable to open test.out: $!";
    print LOG '===============================', "\n";
    print LOG $message, "\n\n";
close LOG;


# eof

============================

<Prev in Thread] Current Thread [Next in Thread>