Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Array of TK::Checkbuttons not acting appropriately

by rcseege (Pilgrim)
on Oct 02, 2006 at 14:24 UTC ( [id://575888]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Array of TK::Checkbuttons not acting appropriately
in thread Array of TK::Checkbuttons not acting appropriately

That is because the checkbox values are either 1 or undef

I'm a little puzzled. Checkbutton values are supposed to be 1 or 0, defaulting to 0, though I can't argue with what I'm seeing. Try selecting, then deselecting a Checkbutton using mikasue's last example. When you press the Submit button for that row now, you shouldn't see the "Use of unitialized..." message, because now the value is 0 instead of undef. I'm going to have to take another look at why my second and third examples didn't behave this way.

Having said that, I agree that your first condition:  if ($foo) { ... } is best for this.

Rob

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 15:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found