in reply to creating a perl entry-point

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.