K
king
I have a perl TK UI. Where the user will feed the Register value.
######################################################################
our $t2=$left1->Label(-text=>'Register',-background=>'cyan')->pack();
our $pre1=$left2->Label(-background=>'green', -width=>12,-
borderwidth=>2, -relief=>'sunken')->Entry()-> pack();
our $ent1=$left2->Entry(-background=>'green', -width=>12,-
borderwidth=>2, -relief=>'sunken')->pack();
$Register_1=$ent1->get();
####################################################################
I want to check whether the user has feeded the register value or kept
it null.
so if i am doing a check like
if (defined $Register_1) { do this}
else { do this}
but its not working. How can i check whether the user has given some
value in the register block or not.
######################################################################
our $t2=$left1->Label(-text=>'Register',-background=>'cyan')->pack();
our $pre1=$left2->Label(-background=>'green', -width=>12,-
borderwidth=>2, -relief=>'sunken')->Entry()-> pack();
our $ent1=$left2->Entry(-background=>'green', -width=>12,-
borderwidth=>2, -relief=>'sunken')->pack();
$Register_1=$ent1->get();
####################################################################
I want to check whether the user has feeded the register value or kept
it null.
so if i am doing a check like
if (defined $Register_1) { do this}
else { do this}
but its not working. How can i check whether the user has given some
value in the register block or not.