> > This reminds me of a related but rather opposite desire I have had
> > more than once: a quotish context that would be otherwise like q() but
> > with some minimal extra typing I could mark a scalar or an array to be
> > expanded as in qq().
> 
> I have wanted that also, although I don't remember why just now.  (I
> think have some notes somewhere about it.)  I will RFC it if you want.
> 
> Note that there's prior art here: It's like Lisp's backquote operator.

Reminds me of m4's changequote.

$command = q$^"PATH=$PATH:^installdir dosomething";
equiv to $command = "PATH=\$PATH:$installdir dosomething";

q$![That'll be $20, !name.];

Hm... no, that wouldn't handle @ or %.

qp(^&*)[string with scalar ^var, array &var, hash *var]

(p for prefix)

I guess your suggestion would look something like

quote("That'll be $20, $title $name", qw(name title));

Reply via email to