in reply to java/c has main - perl has ?

You could go the route that CPAN.pm uses:

perl -MCPAN -e shell

Then just write a 'shell' sub that does what you want and export it by default.

If that is no good, you could possibly look at $0 to see if you are being invoked as ./DBUtil.pm or being required by another program or module. I have never tried that but it might work...