Strip a set of characters from a string: Difference between revisions

Line 67:
 
=={{header|Perl}}==
Caveat: in this version hyphens in the second argument can be used to specify ranges; if you need to actually strip hyphens, you need to put a backslash before it
<lang perl>sub stripchars {
my ($s, $chars) = @_;
Anonymous user