Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Finding error: uninitialized value in concatenation?

by Roy Johnson (Monsignor)
on Mar 02, 2005 at 15:27 UTC ( [id://435866]=note: print w/replies, xml ) Need Help??


in reply to Finding error: uninitialized value in concatenation?

Just to be clear: is the line it refers to the print within the while in your example code? If one of the fetched columns is NULL, the variable it is assigned to will be undef.

You can group your my declarations, and you can use map to get rid of undefs:

while ( my( $giName, $gssName, $definition, $sequence ) = map {defined + ? $_ : ''} $sth2->fetchrow_array )
Or you can turn off uninitialized warnings within the while loop:
no warnings 'uninitialized';

Caution: Contents may have been coded under pressure.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://435866]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-18 17:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found