[ Curtis L. Olson writes: ]
> (Is firstname.lastname@example.org a mailing list I need to be on
> in order to see replies?)
It usually helps to monitor a list for awhile before posting. And it's
just plain good netiquette.
> I was having problems getting the advertise/noadvertise features in
> the mailing list config file to work. For instance, line 884 in sub
> do_lists() of the file "majordomo" reads:
> $command = "(qq~$reply_addr~ =~ $i)";
> Although this doesn't seem to generate an execution error, it
> definitely doesn't work on our system -- no matches are ever
> reported. From my knowledge of perl, this doesn't even seem to be
> syntactically correct.
You need to learn more about Perl. ;-)
> I modified this line (and made a similar modification to line 894) to
> $command = "(\$reply_addr =~ $i)";
> This made much more sense to me and seemed to work just fine.
Really?? All you did was delay the interpolation of $reply_addr until
the eval in line 885 and remove the quoting from the substituted value
of $reply_addr. The bare-word value of $reply_addr probably defaulted to
a string (with no more interpolation done for the embedded '@', so that
may have made it work better), but that would be, uh..., "unpredictable"
if $reply_addr happened to match a reserved word or a subroutine name,
e.g. "Reply-To: <unlink listname.config>".
The qq~~ is legal, but $reply_addr should have the meta-characters
escaped before it's eval'ed to keep the '@' from being interpolated by
Perl 5. The cheap fix is to use non-interpolating inner quotes:
884 $command = "(q~$reply_addr~ =~ $i)";
894 $command = "(q~$reply_addr~ =~ $i)";
Note 1 'q' instead of 2. This still counts on '~' not being in
$reply_addr (probably a safe bet), but really should escape all
non-alphanumeric characters in a copy of $reply_addr to be robust.
Dave Wolfe *Not a spokesman for Motorola*
Motorola MMTG 6501 Wm. Cannon Dr. W. OE112 Austin TX 78735-8598