in reply to Re^3: Errror while execution query
in thread Errror while execution query

I think you might be able to put a method call inside a double-quoted string by surrounding it with list constructor and de-references like this

$result->execute() or print "Error while executing query --- @{[$result->errstr()]}";

but whether you would want to is another matter as it looks a bit messy. If you have a call in the middle of a string then it might make more sense as you don't have to keep closing and opening quotes.

Cheers,

JohnGG