Apr 1, 2010 #1 csudess Technical User Apr 1, 2010 14 HU How could i check the entry when is empty or not?
Apr 1, 2010 #2 CJason Programmer Oct 13, 2004 223 US Could you explain what you mean by "entry"? Upvote 0 Downvote
Apr 1, 2010 Thread starter #3 csudess Technical User Apr 1, 2010 14 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 May 9, 2002 735 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 Aug 5, 2008 254 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 Apr 1, 2010 14 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'; }