Ken Hooper <bighouse(_at_)type2(_dot_)com> writes:
...
Also, how could I have cat expand the variable in the text?
| cat -; perl -pe 's:\$(\w+):${$1}:eg' reply.txt
| perl -pe 'BEGIN{while(<STDIN>){print}} s:\$(\w+):${$1}:eg' reply.txt
Okay...could somebody tell me where to put the var in? Just the one
already-extracted var REPLYTO. I tried these both as they sit and by
putting {$REPLYTO} where {$1} occurs above. Either way this sentence
becomes the one following:
...
Whoops, duh. I left out three characters in each. It should be $ENV{$1}
instead of ${$1}. The hash %ENV contains the environment inherited from
procmail.
| cat -; perl -pe 's:\$(\w+):$ENV{$1}:eg' reply.txt
| perl -pe 'BEGIN{while(<STDIN>){print}} s:\$(\w+):$ENV{$1}:eg' reply.txt
Philip Guenther