in reply to Re^3: Here documents in blocks
in thread Here documents in blocks
> Personally I put the HERE-IS block at the left hand edge, and skip the whole "indent" thing.
(A what (indent) you see, is what you get.)
me too, mostly at the end of a sub.
If I need a template, then it'll normally also merit a sub.
sub html_admin { my($user_number)=@_; my $HTML_restricted = ""; $HTML_restricted = <<"__HTML__" if $user_number == 20; <tr> <td class="someClass">Restricted</td> </tr> __HTML__ return << "__HTML__"; <table> <tr> <td class="someclass" style="text-align:center">Some Content +</td> </tr> $HTML_restricted </table> __HTML__ }
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Here documents in blocks
by Bod (Parson) on Dec 19, 2020 at 21:56 UTC | |
by LanX (Saint) on Dec 20, 2020 at 02:03 UTC | |
by Bod (Parson) on Dec 20, 2020 at 13:01 UTC | |
by LanX (Saint) on Dec 20, 2020 at 13:55 UTC |
In Section
Seekers of Perl Wisdom