procmail
[Top] [All Lists]

Re: stumped on passing arguments

2000-12-08 16:43:17
Hi,

Anthony Seddon wrote:
The only suggestion I have is to create the command as a simple perl
program instead of a one liner and grab $RMARGIN using $ENV{"RMARGIN"}

...which should work great.

If anyone out there has an answer to your question I'd love to hear it
too!


mark david mcCreary wrote:
RMARGIN=65
:0 wfb
| perl  -M"Text::Autoformat" -e'autoformat{left=>1, right=>$RMARGIN, 
all=>1}'

The theory seems to be to wrap double quotes around the arguments, and
sometimes  maybe double quotes around the single quotes.

Not sure that's a good idea, unless you want perl to see the single
quotes. 

I do believe that I have tried all possible combinations of wrapping the
above with various combinations of quotes without success.

Did you try this one:

RMARGIN=65
:0 wfb
| perl  -M"Text::Autoformat" -e'autoformat{left=>1, right=>'$RMARGIN,' all=>1}'

This should cause perl to see

   argv[1] = Text::Autoformat
   argv[2] = autoformat{left=>1, right=>65, all=>1}

The single quotes prevent expansion of things like $RMARGIN.  
-- 
Neither I nor my employer will accept any liability for any problems
or consequential loss caused by relying on this information.  Sorry.
Collin Park                         Not a statement of my employer.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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