if (!caller) { main(); exit; } sub main { # only used when called from the command line # ... }