I was working with a tutorial found in the perl documentation about how to use Getopt::Long in a script. In there it shows how to add documentation using Pod::Usage rather then having to type everything out a subroutine or something. Anyhow in the example they have this;
GetOptions('help|?' => \$help, 'b|backup' => \&backup, d|discover => \&discover, man => \$man) or pod2usage(2);
pod2usage(1) if $help;
pod2usage(-exitstatus => 0, -verbose => 2) if $man;
I added some of my own arguments.
I get how to refer to the first section of documentation. But how do I refer to the second section as stated by pod2usage(2)
?
When I add a new section after the =cut
at the end of section 1, when I try to have it display it I am met with a command prompt, like it went in and then out without show the section. Am I doing something wrong?