Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Just another Perl shrine
 
PerlMonks  

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

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.