I'm sure there's a good reason for it, but the code below gives a syntax
error. I think it ought to do what it looks like it ought to do. What's
the reason?

$foo = 'bar';
$foo =~ /bar/ and {print "yes"; print "yes again";}

gives: syntax error at test line 2, near "; print"

$foo = 'bar';
$foo =~ /bar/ and {print "yes";}

gives: syntax error at test line 2, near ";}"

$foo = 'bar';
$foo =~ /bar/ and {print "yes"}

prints "yes" as expected.

What's going on, eh?

-- 
Jonathan Peterson
Technical Manager, Unified Ltd, 020 7383 6092
[EMAIL PROTECTED]

Reply via email to