Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

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?

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (8)
As of 2024-04-18 16:55 GMT
Find Nodes?
    Voting Booth?

    No recent polls found