... produces:=for comment Comment! =cutSECTION Comment!
That is the correct behavior, your conclusion "=for comment hides text from perl but not perldoc" isn't correct. From perlpod (emphasis mine):
The command "=for formatname text..." specifies that the remainder of just this paragraph (starting right after formatname) is in that special format.
Remove the blank line after the =for and the "Comment!" is hidden. The =for still begins a section of POD that needs to be terminated by =cut, so Perl will ignore the entire example you posted.
In reply to Re^3: Multi-line comments in perl code?
by haukex
in thread Multi-line comments in perl code?
by mrguy123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |