3 ms·
Lifted directly from sed, one of Perl's inspirations: s/replace #/with $/ s#replace /#with _#
by twic 6y ago
Lifted directly from sed, one of Perl's inspirations:
s/replace #/with $/
s#replace /#with _#
- mycl 6y agoI think it was in ed already. The POSIX ed spec says: "Any character other than <space> or <newline> can be used instead of a slash to delimit the RE and the replacement."
- codesnik 6y agoand, AFAIR, in perl space and enter could be delimiters too! I think I've used it in some perlgolf task which didn't count whitespace.