The Perl Toolchain Summit 2025 Needs You: You can help 🙏 Learn more

Clean-Backspace version 1.03
============================
NAME
Clean::Backspace - removes hidden backspaces and their corresponding deleted characters in strings
SYNOPSIS
use Clean::Backspace;
my $clean = Clean::Backspace->new();
$clean->backspace(\@list_of_string_refs);
DESCRIPTION
This module removes "hidden" backspaces and their corresponding deleted characters from strings.
Some terminals generate the backspace control character ^H when backspacing. This is due to how
that particular terminal is configured. When terminals are configured to generate ^H instead of
ascii del the ^H character as well as the deleted character are retained in the string. If the
terminal is configured in this manner and the backspace is used the string may appear to be normal.
An example string on such a terminal could be the string 'test'. Let's say it was typed like this:
ted<backspace>st
When you look at the string it appears as 'test'. There are various mechanisms to detect the
hidden characters and the string is actually 'ted^Hst'. This can cause problems in various IT
infrastructures because all characters in the string will be interpreted. One example could be
with an Oracle database. The strings that are typed with backspaces might look normal in your
terminal but when you look at Oracle database table fields the unwanted characters might be visible.
INSTALLATION
To install this module type the following:
perl Makefile.PL
make
make test
make install
COPYRIGHT AND LICENCE
Copyright (C) 2009 by Bruce Burch
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.