Oops... here's the PCSCRIPTS part with a couple of fixes:

use warnings;
use strict;

my $CFG;
my $TMP;

open(CFG, '<', shift) or exit;
open(TMP, '>', shift) or die "imapproxy.postint: could not open: $!";

my %params = map { $_ => undef } split(/\s/, $ENV{'PARAMS'});

while (<CFG>)
{
        my ($key) = m/^(\w+)/;
        if ( defined $key and exists $params{$key} ) {
                my $v = $_;
                $v =~ s/^\w+ *$//;
                chomp($v);
                print TMP "$key=$v\n";
        }
}


-- 
Regards,
Andreas Henriksson



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to