in reply to testing a standalone script with parameters

throws_ok takes a code ref as the first parameter. Try:

throws_ok (sub {main ()}, qr/Usage:/, 'main () should give a usage err +or without any arguments');

True laziness is hard work