On Tue, Jun 30, 2015 at 10:25 PM, Patrick R. Michaud <pmich...@pobox.com> wrote: > On Sat, Jun 27, 2015 at 05:39:32PM -0500, Tom Browder wrote: ... > multi sub MAIN(:$need!) { say "need"; } > multi sub MAIN(:$hope!) { say "hope"; }
I now have another problem, and I think I know the solution but I hope there is another way. When I just use one MAIN sub and the 'semicolon' form, the rest of the file acts like it is in the scope of the MAIN sub, BUT when I use the multi form it seems I'm not in the same scope so what are my choices? The only way out I see so far is: 1. Write the 'main' program as another subroutine and call it from each of the appropriate multi subs--aarghh! OR 2. Drop back to using just one MAIN sub and adding more code to handle the alternate options as I have tried to describe. OR 3. Translate all my perl 5 code and handle the @*ARGS array just as i have done with the @ARGV array (sigh!). Best, -Tom