[Quoting Michael G Schwern, on March 6 2005, 10:32, in "Re: testing non-modu"]
> Or if you want to be super portable you can do this:
>
> use Test::Output;
> local @ARGV = qw(some args);
> stdout_is( sub { do "bin/myprogram" }, 'wibble' );
>
> Which has the nice side benefit of making sure your code initialzes itself
> properly between each run rather than just assuming its in a fresh process
> each time.And, hopefully, the program doesn't call 'exit()'... -- Johan
