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

[MacPerl] Subroutines



I need some help with subroutines.  I can make them, compile them, but
when I want my program to call them, nothing will actually make the
subroutines work.  Can I get some help here?

Sample snippet from code:
-----
if ($UserPassword eq $Data[1]) {
  print "Password accepted.\n";
  MainMenu
  } else {
  print "Password invalid.\n";
  die "Invalid password - open program again for another try.\n";
  }

sub MainMenu {
  print "A.) Enter another deduction,\n";
  print "B.) Review past 5 deductions,\n";
  print "C.) Review past 2 deposits,\n";
  ...  [not continued]
  }
-----

and when i "Run" the program, the program has no problems compiling, but
when the "MainMenu" call comes in the script, the script quits..  no
reason why..  it just goes *KaPoot*

Any help?

Thanks.

-T-


timjudd@teleport.com  HTTP://www.teleport.com/~timjudd/  IRC nick: StayPuft
*NO* chain letters of any kind!    World Wide Web Page designer, ask for it
PGP available.   I'll offer to anyone who has a valid reason for needing it.