Jump to content

Strip comments from a string: Difference between revisions

Added Perl.
(Added PicoLisp)
(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}}==
845

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.