##################################### # what this does: Dialog Box that writes a hashed financial goal (float $num, string $desc) into a .dat file GF # # important variables defined: TextEntry $numNewGoal marked by Label $tag, TextBox $descNewGoal. ##################################### my $addGoalButn=$features->Button(-text=>'Add Goal', -command=>sub { $n_prompt=$main->DialogBox(-title=>"Add a \$ value and explanation", -buttons=>["OK","Cancel"]), $tag=$n_prompt->add(Label, -text=>"\$"), $numNewGoal=$n_prompt->add(Entry), $descNewGoal=$n_prompt->add(Text, -height=>'5', -width=>'30'), $n_prompt->Show(), $num=$numNewGoal->get(), $desc=$descNewGoal->get("1.0", "end"), #paid upgrade option: rewrite below for Excel/SQL connectivity open(GF, "+<$file_goals") || warn("Your file is empty."), print GF join('\n', $num, $desc), close(GF) });