<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Backspace characters in perl input in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/backspace-characters-in-perl-input/m-p/3231330#M703156</link>
    <description># Step 1. remove all backspaces from string start&lt;BR /&gt;$indata =~ s/^\b+//;&lt;BR /&gt;# Step 2. remove all backspace&lt;BR /&gt;1 while $indata =~ s/.\b//;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;FWIW $indata =~ s/.\b//g; would not work, because that would fail to remove&lt;BR /&gt;&lt;BR /&gt;"abcd\b\b\bxx"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
    <pubDate>Fri, 26 Mar 2004 13:57:47 GMT</pubDate>
    <dc:creator>H.Merijn Brand (procura</dc:creator>
    <dc:date>2004-03-26T13:57:47Z</dc:date>
    <item>
      <title>Backspace characters in perl input</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/backspace-characters-in-perl-input/m-p/3231329#M703155</link>
      <description>I have written a perl script that accepts input&lt;BR /&gt;from the user in the form of:&lt;BR /&gt;chomp($indata = &lt;STDIN&gt;);&lt;BR /&gt;which works just fine, except that it the user&lt;BR /&gt;types a backspace because he misspelled a word,&lt;BR /&gt;the backspace characters show up in the complete text!  If what is being entered is a file name, the file can not be found!  How can I get perl to read the data already collapsed?&lt;BR /&gt;Or, how can I collapse it before saving it?&lt;BR /&gt;&lt;BR /&gt;Thanks for your assistance,&lt;BR /&gt;jls&lt;/STDIN&gt;</description>
      <pubDate>Fri, 26 Mar 2004 13:32:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/backspace-characters-in-perl-input/m-p/3231329#M703155</guid>
      <dc:creator>Joel Shank</dc:creator>
      <dc:date>2004-03-26T13:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Backspace characters in perl input</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/backspace-characters-in-perl-input/m-p/3231330#M703156</link>
      <description># Step 1. remove all backspaces from string start&lt;BR /&gt;$indata =~ s/^\b+//;&lt;BR /&gt;# Step 2. remove all backspace&lt;BR /&gt;1 while $indata =~ s/.\b//;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;FWIW $indata =~ s/.\b//g; would not work, because that would fail to remove&lt;BR /&gt;&lt;BR /&gt;"abcd\b\b\bxx"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Fri, 26 Mar 2004 13:57:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/backspace-characters-in-perl-input/m-p/3231330#M703156</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-03-26T13:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Backspace characters in perl input</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/backspace-characters-in-perl-input/m-p/3231331#M703157</link>
      <description>That didn't work :-(&lt;BR /&gt;&lt;BR /&gt;When I enter: myfle&lt;BS&gt;&lt;BS&gt;ile&lt;BR /&gt;I get nothing (null?) after those commands.&lt;BR /&gt;&lt;BR /&gt;What I want to get is: myfile&lt;BR /&gt;&lt;BR /&gt;How can I get that?  Even as I read your code, I am not sure I would have got what I wanted anyway.  It looks like I'd get: myfleile, which isn't what I need.&lt;BR /&gt;&lt;BR /&gt;jls&lt;/BS&gt;&lt;/BS&gt;</description>
      <pubDate>Fri, 26 Mar 2004 14:18:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/backspace-characters-in-perl-input/m-p/3231331#M703157</guid>
      <dc:creator>Joel Shank</dc:creator>
      <dc:date>2004-03-26T14:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Backspace characters in perl input</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/backspace-characters-in-perl-input/m-p/3231332#M703158</link>
      <description>D'uh (/me curses) please excuse me. Should not have happened.&lt;BR /&gt;&lt;BR /&gt;lt09:/tmp 107 &amp;gt; perl -de 1&lt;BR /&gt;&lt;BR /&gt;Loading DB routines from perl5db.pl version 1.23&lt;BR /&gt;Editor support available.&lt;BR /&gt;&lt;BR /&gt;Enter h or `h h' for help, or `man perldebug' for more help.&lt;BR /&gt;&lt;BR /&gt;main::(-e:1):   1&lt;BR /&gt;  DB&amp;lt;1&amp;gt; $indata = "myfle^H^Hile"&lt;BR /&gt;&lt;BR /&gt;  DB&amp;lt;2&amp;gt; x $indata&lt;BR /&gt;0  "myfle\cH\cHile"&lt;BR /&gt;  DB&amp;lt;3&amp;gt; $indata =~ s/^\b+//&lt;BR /&gt;&lt;BR /&gt;  DB&amp;lt;4&amp;gt; x $indata&lt;BR /&gt;0  "myfle\cH\cHile"&lt;BR /&gt;  DB&amp;lt;5&amp;gt; 1 while $indata =~ s/.\b//&lt;BR /&gt;&lt;BR /&gt;  DB&amp;lt;6&amp;gt; x $indata&lt;BR /&gt;0  ''&lt;BR /&gt;  DB&amp;lt;7&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Now I see that I erroneously misused \b as backspace, which it is not in a regex.&lt;BR /&gt;&lt;BR /&gt;chomp ($indata = "myfle\b\bile"); # Here it *is* a backspace&lt;BR /&gt;$indata =~ s/^\cH+//; # Ctrl-H is backspace&lt;BR /&gt;1 while $indata =~ s/.[\b]//; # \b also is backspace inside character class&lt;BR /&gt;&lt;BR /&gt;  DB&amp;lt;7&amp;gt; chomp ($indata = "myfle\b\bile"); # Here it *is* a backspace&lt;BR /&gt;&lt;BR /&gt;  DB&amp;lt;8&amp;gt; x $indata&lt;BR /&gt;0  "myfle\cH\cHile"&lt;BR /&gt;  DB&amp;lt;9&amp;gt; $indata =~ s/^\cH+//; # Ctrl-H is backspace&lt;BR /&gt;&lt;BR /&gt;  DB&amp;lt;10&amp;gt; x $indata&lt;BR /&gt;0  "myfle\cH\cHile"&lt;BR /&gt;  DB&amp;lt;11&amp;gt; 1 while $indata =~ s/.[\b]//; # \b also is backspace inside character class&lt;BR /&gt;&lt;BR /&gt;  DB&amp;lt;12&amp;gt; x $indata&lt;BR /&gt;0  'myfile'&lt;BR /&gt;  DB&amp;lt;13&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn [ 0 points for the first answer. I feel ashamed! ]</description>
      <pubDate>Fri, 26 Mar 2004 14:48:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/backspace-characters-in-perl-input/m-p/3231332#M703158</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-03-26T14:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Backspace characters in perl input</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/backspace-characters-in-perl-input/m-p/3231333#M703159</link>
      <description>That did it!  I am not sure how it works, but right now I don't care, as long as it works!&lt;BR /&gt;&lt;BR /&gt;You get 2 points for the first try.  I don't anyone should get 0 points if they respond to a help request :-)&lt;BR /&gt;&lt;BR /&gt;Thanks much&lt;BR /&gt;jls</description>
      <pubDate>Fri, 26 Mar 2004 14:59:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/backspace-characters-in-perl-input/m-p/3231333#M703159</guid>
      <dc:creator>Joel Shank</dc:creator>
      <dc:date>2004-03-26T14:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Backspace characters in perl input</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/backspace-characters-in-perl-input/m-p/3231334#M703160</link>
      <description>So, what does code look like exacly?</description>
      <pubDate>Fri, 15 Jul 2005 09:43:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/backspace-characters-in-perl-input/m-p/3231334#M703160</guid>
      <dc:creator>Mike Keys</dc:creator>
      <dc:date>2005-07-15T09:43:49Z</dc:date>
    </item>
  </channel>
</rss>

