in reply to formbox.pl
you could have something like the following, which will be much safer, saner, and easier to grasp and maintain:eval "\$answer$count=0;"; eval "\$textframe$fcount->Checkbutton(...);";
Once you start to organize your widgets and related data as parts of an overall data structure, the code will be a lot more compact and a lot easier to enhance.$answer[$count] = 0; $textframe[$fcount]->Checkbutton(...);
I won't spend the time to try to prove this, but I suspect the same functionality could be achieved with about half as much code, or more likely, a third.
update: Forgot to mention -- Please fix your indenting style. Try this command-line, putting the file name of your script as indicated:
Doesn't that seem easier to read than what you posted? It does make a difference. (The output will differ in more than just the spacing, but the main point is to note the overall approach and layout.) Actually having tried it myself just now, it seems you have lots of unnecessary white space within your eval strings -- once you get rid of all those evals, it'll all be nicer in many respects.perl -MO=Deparse your_script.pl
|
|---|