On Mon, Apr 16, 2001 at 07:44:57PM -0400, Sterin, Ilya wrote:
> I am afraid that's wrong, the arrow -> is resolved in the string context
> since it's the same as dereferencing the object in the string context.  The
> problem is that the user which is executing the script does not have the
> environment set up.

The arrow operator interpolates inside a double quoted string for array and
hash elements, but not for method calls.  Thus, the advice about
$dbh->errstr() was correct.

print "An error occured: $dbh->errstr()\n";           # wrong
print "An error occured: ", $dbh->errstr(), "\n";     # right
print "An error occured: $DBI::errstr\n";             # right


Ronald

Reply via email to