What’s the easiest to maintain way of printing a Perl program’s usage to stdout? I am looking for heredoc tricks or anything similarly useful. Forget individual successive prints.
EDIT 1: the issue I have faced many times is to have to maintain usage, general script documentation and option processing separately. I was looking for a way to combine some or all of this with minimal overhead. Thanks for the many suggestions. I will accept an answer when I have an opportunity to experiment proposed solutions.
Pod::Usagemaybe? This was suggested byGetOpt::Long.Getopt::Std::WithCheckallows you to combine the definition of options along a description, andGetopt::Simpledoes the same.