> -----Original Message----- > From: Tomasi, Chuck [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, November 21, 2001 11:20 AM > To: '[EMAIL PROTECTED]' > Subject: Getting past "Use of uninitialized value..." > > > Perl: 5.6.0 > DBI: 1.2.0 > DBD::Oracle: 1.12 > OS: Solaris 2.7 > > I'm reading in a list of users from an Oracle database. Some > fields are > required, some are optional (e.g. Title.) When I get back my > populated > array of hashes, I have no idea what I got until I print it. > Unfortunately, > while using strict, I get the dubious message: > > Use of uninitialized value in concatenation (.) at /path...pl > line 1288 > > every time a record comes up with no title field populated. > > Is there some way to make this work whether a value was read from the > database or not? > > print "\t\t<td nowrap>$ulist[$i]{'Title'}</td>\n";
Actually, "use strict" isn't the culprit; it's -w or "use warnings". For 5.6 and higher, you can wrap the code in a block like this: { no warnings 'uninitialized'; ... your code here ... } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]