[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Novice question regards subroutines



tjudd@pacifier.com,Internet writes:
>
>I've got a subroutine for each function (including menus) and when I
>attempt to use one function; then return to the main menu, it does the
>same
>function time and time and time again.  I have to Apple-. to escape and
>then close it.  Below is the script.
>
>  if ($MainMenu = "1") {

This is always true. If you plug "1" into $MainMenu (like you're doing
here), you'll always get true and never get anywhere (other than here).
Try either ($MainMenu eq "1") or ($MainMenu == 1).

Man, I never tire of swearing at myself for making mistakes like this.
But, then, I never seem to _stop_ making mistakes like this!

-josh


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch