Rosetta Code/Fix code tags: Difference between revisions
→{{header|Perl}}: Allow highlighting by slight code modification
(added perl) |
(→{{header|Perl}}: Allow highlighting by slight code modification) |
||
Line 13:
=={{header|Perl}}==
<lang perl>
# coding: utf-8
Line 37 ⟶ 34:
'intercal', 'c_mac', 'thinbasic', 'java5', 'xpp', 'boo', 'klonecpp',
'blitzbasic', 'eiffel', 'povray', 'c', 'gettext');
my $slang = '\lang';
while (<STDIN>) {
foreach my $i (@langs) {
s|<$i>|<lang $i>|g;
s|</$i>|<
}
s|<code (.*)>|<lang \1>|g;
s|</code>|<
print;
}
</
=={{header|Python}}==
|