In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Perl.Org) writes: >If my Perl contains ${DBI::errstr} I get warnings like this: > >Ambiguous use of ${DBI::errstr} resolved to $DBI::errstr at (eval 20) line 284. > >If my Perl contains $DBI::errstr (without the braces) I don't get these >warnings. Is there an explanation for this?
This is because there is a routine DBI::errstr() and therefore it is possible that you meant to call it and take its return value as the name of a scalar variable. Yuk. Fortunately Perl made the right call. There's no reason to put braces in like that except when necessary to isolate a variable name in interpolation. Also, look at the RaiseError property of DBI connections. I gave up referring to DBI::errstr some years ago. -- Peter Scott http://www.perldebugged.com/ *** NEW *** http://www.perlmedic.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>