Apr 1, 2010 #1 csudess Technical User Joined Apr 1, 2010 Messages 14 Location HU How could i check the entry when is empty or not?
Apr 1, 2010 #2 CJason Programmer Joined Oct 13, 2004 Messages 223 Location US Could you explain what you mean by "entry"? Upvote 0 Downvote
Apr 1, 2010 Thread starter #3 csudess Technical User Joined Apr 1, 2010 Messages 14 Location HU perl entry?! this is a sample entry code so this is the entry $ent=$mw->Entry(-width=>4, -font=>"arial 10 bold" ); Upvote 0 Downvote
perl entry?! this is a sample entry code so this is the entry $ent=$mw->Entry(-width=>4, -font=>"arial 10 bold" );
Apr 2, 2010 #4 Newposter Technical User Joined May 9, 2002 Messages 735 Location US Something like this: &checkempty($username,"Your name cannot be blank."); Newposter "Good judgment comes from experience. Experience comes from bad judgment." Upvote 0 Downvote
Something like this: &checkempty($username,"Your name cannot be blank."); Newposter "Good judgment comes from experience. Experience comes from bad judgment."
Apr 2, 2010 #5 Zhris Programmer Joined Aug 5, 2008 Messages 254 Location GB Would you mean: Code: $ent=$mw->Entry(-width=>4, -font=>"arial 10 bold" ); if ($ent) { #not empty } else { #empty } Chris Upvote 0 Downvote
Would you mean: Code: $ent=$mw->Entry(-width=>4, -font=>"arial 10 bold" ); if ($ent) { #not empty } else { #empty } Chris
Apr 4, 2010 Thread starter #6 csudess Technical User Joined Apr 1, 2010 Messages 14 Location HU Thank u for ur answers i found the right code which is: use strict; use warnings; use 5.010; my $entry = ''; if ($entry eq '') { say '$entry is blank'; } else { say '$entry might be undef'; } Upvote 0 Downvote
Thank u for ur answers i found the right code which is: use strict; use warnings; use 5.010; my $entry = ''; if ($entry eq '') { say '$entry is blank'; } else { say '$entry might be undef'; }