> Not exactly what I was looking for. I am building the menu within my code
> and so there is no _Click subroutine for each menu item. Unless I can build
> subroutines within my code as well, but I don't know how to go about doing
> that.

  I've done that.  Define the code then use eval to set it up:

  foreach $item (@somelist) {
    $sub_code=<<end_code;
      sub MySub_${item}_Click {
          \$SomeFlag = "$item";
          ...
      }
end_code

   eval $sub_code;
  }


Reply via email to