#!/usr/bin/perl -wl $s = "this is an\b\b not correct usage"; $s =~ s[.\cH][]g; print $s; print "and one's still there" if grep { ord == ord"\b" } split //,$s; __END__ output: this is not correct usage and one's still there