Strip comments from a string: Difference between revisions
Added Perl.
(Added PicoLisp) |
Underscore (talk | contribs) (Added Perl.) |
||
Line 111:
print ( string.match( s1, "[^"..comment_symbols.."]+" ) )
print ( string.match( s2, "[^"..comment_symbols.."]+" ) )</lang>
=={{header|Perl}}==
<lang perl>foreach (<>) {
s/[#;].*//;
print;
}</lang>
=={{header|PicoLisp}}==
|