Update: HA! boftx posted almost exactly this (and I endorse the __END__ bit as well) while I didn't refresh the OP to notice... Great minds, I say!
In addition to what roboticus said, here's a skeleton of what you are suggesting-
#!/usr/bin/env perl use strict; use warnings; main_routine(); exit; sub main_routine { # lots of stuff. }
Keeping your subs separate with an exit keeps code accidents away pretty well.
In reply to Re: creating a perl entry-point
by Your Mother
in thread creating a perl entry-point
by morelenmir
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |