#!/bin/sh eval 'exec perl -S "$0" "$@"' if 0; # this line keeps it from being seen by perl. use lib ...; # if necessary. use My::App; # or whatever it's called. my $app = My::App->new(); $app->parse_args(@ARGV); # passing in @ARGV is recommended but not required exit $app->run();