On Wed, Oct 25, 2006 at 12:57:52PM -0400, Joe Flowers wrote:
> I'd prefer to use M::SA->check_message_text(), but if I do a 
> M::SA->check_message_text('This is a programmer's nightmare.'), then 
> M::SA->check_message_text() will choke because of the (') in the middle 
> of the string. How do I properly get around this problem?

You can use any quoting mechanism you like:

...("This is a programmer's ...")
...([EMAIL PROTECTED] is a programmer's ...@)
etc.

> Also, M::SA->check_message_text('This too\') is a problem too because of 
[...]
> Any ideas on the best way to handle this?

Well, SA won't help you with general Perl quoting, just so we're clear this
isn't SA specific.  You could read the string into a variable then pass the
variable, or use one of the above methods, or something like:
$variable = <<EOF;
This is a programmer's ...
blah
foo bar
EOF
...check_message_text($variable);

-- 
Randomly Selected Tagline:
Q: Don't you know who our President is?
 A: A working class man who started out with nothing in life but two strong
    hands and a brain, and now has to make due with just the hands.
         - http://slashdot.org/comments.pl?sid=189485&cid=15602732

Attachment: pgp7h141z75Kt.pgp
Description: PGP signature

Reply via email to