[Chicago-talk] pass a scalar from procmail to perl?
Mike Fragassi
frag at ripco.com
Tue Dec 21 09:09:30 PST 2010
I suspect that $SUBJECT is being passed in as an environment variable.
In other words, it'd be like the difference between these 2 command lines:
SUBJECT=Foo perl -e 'print $ENV{SUBJECT}'
vs.
SUBJECT=Foo perl -e 'print $SUBJECT'
So try $ENV{SUBJECT} instead of $SUBJECT.
If that doesn't work, it might be quoting: you may need to use
double-quotes around the command after the -e.
> * ? perl -e 'require "/home/richard/.pmdir/test_subject.pl"; test_subj("$SUBJECT");'
-- Mike F.
More information about the Chicago-talk
mailing list