After fixing several syntax errors in your code, I get -special to work by adding a blank line after each
=head1 line:
use warnings;
use strict;
use Pod::Usage;
use Getopt::Long;
GetOptions("help");
=head1 SYNOPSIS
here's the main usage stuff
=head1 SPECIAL
special usage stuff here...
=cut
# This prints SYNOPSIS above just fine as expected:
#pod2usage(-verbose => 0) if ($opt_help);
# This only prints the '-message' and nothing else:
pod2usage({-verbose => 99,
-sections => [qw(SPECIAL)],
-message => "Here's special stuff...\n",
});
__END__
Here's special stuff...
Special:
special usage stuff here...
You should use podchecker on your code:
*** WARNING: empty section in previous paragraph at line ... in file .
+..