<?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: Carriage Return in perl scripts in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/carriage-return-in-perl-scripts/m-p/4728377#M655474</link>
    <description>It comes from a PC where the end-of-line is two characters (CR+LF). It is so pervasive that HP-UX has dos2ux to remove the CR (^M in vi or cat -v):&lt;BR /&gt; &lt;BR /&gt;dos2ux myscript.dos &amp;gt; myscript.perl&lt;BR /&gt;</description>
    <pubDate>Mon, 20 Dec 2010 03:11:44 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2010-12-20T03:11:44Z</dc:date>
    <item>
      <title>Carriage Return in perl scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/carriage-return-in-perl-scripts/m-p/4728376#M655473</link>
      <description>I used scp to copy a perl script from linux to HP-UX and noticed ^M on every line.&lt;BR /&gt;&lt;BR /&gt;How come?  I assumed that linux follows the unix convention where each line is terminated by line feed.  Where does the carriage return come from?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Dec 2010 02:18:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/carriage-return-in-perl-scripts/m-p/4728376#M655473</guid>
      <dc:creator>Peter Brimacombe</dc:creator>
      <dc:date>2010-12-20T02:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Carriage Return in perl scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/carriage-return-in-perl-scripts/m-p/4728377#M655474</link>
      <description>It comes from a PC where the end-of-line is two characters (CR+LF). It is so pervasive that HP-UX has dos2ux to remove the CR (^M in vi or cat -v):&lt;BR /&gt; &lt;BR /&gt;dos2ux myscript.dos &amp;gt; myscript.perl&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Dec 2010 03:11:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/carriage-return-in-perl-scripts/m-p/4728377#M655474</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2010-12-20T03:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Carriage Return in perl scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/carriage-return-in-perl-scripts/m-p/4728378#M655475</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] Where does the carriage return come&lt;BR /&gt;&amp;gt; from?&lt;BR /&gt;&lt;BR /&gt;If my psychic powers were not so pathetically&lt;BR /&gt;weak, then I might be able to determine&lt;BR /&gt;whence this file ("perl script") came, and&lt;BR /&gt;that might provide a clue as to the reasons&lt;BR /&gt;for its line endings being what they are.&lt;BR /&gt;(Whatever they are.)&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] and noticed ^M on every line.&lt;BR /&gt;&lt;BR /&gt;Noticed how?  How did the lines end on the&lt;BR /&gt;original file (before the transfer)?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I used scp [...]&lt;BR /&gt;&lt;BR /&gt;As usual, showing actual commands with their&lt;BR /&gt;actual output can be more helpful than vague&lt;BR /&gt;descriptions or interpretations.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] linux [...]&lt;BR /&gt;&lt;BR /&gt;      uname -a&lt;BR /&gt;      ssh -V&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] HP-UX [...]&lt;BR /&gt;&lt;BR /&gt;      uname -a&lt;BR /&gt;      ssh -V&lt;BR /&gt;&lt;BR /&gt;Even a few basic facts might help more than&lt;BR /&gt;approximately none.</description>
      <pubDate>Mon, 20 Dec 2010 07:33:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/carriage-return-in-perl-scripts/m-p/4728378#M655475</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-12-20T07:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Carriage Return in perl scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/carriage-return-in-perl-scripts/m-p/4728379#M655476</link>
      <description>HI Peter:&lt;BR /&gt;&lt;BR /&gt;As Bill noted, Windows (and a few other platforms) delimit lines in text files with a carriage-return/linefeed combination (CRLF) as opposed to UNIX's simple linefeed (LF).  There is nothing here that is special/indigenous to the fact that you are dealing with a Perl script.&lt;BR /&gt;&lt;BR /&gt;A common mistake is to FTP a file in binary mode from a Windows to UNIX server.   In this case, like 'scp', any carriage return characters are transferred intact.  If you use FTP's ASCII mode, carriage-return characters will be added or subtracted to match the receiving platform's standard.&lt;BR /&gt;&lt;BR /&gt;A good survery of the climate can be found here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://en.wikipedia.org/wiki/Newline" target="_blank"&gt;http://en.wikipedia.org/wiki/Newline&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Dec 2010 12:38:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/carriage-return-in-perl-scripts/m-p/4728379#M655476</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-12-20T12:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Carriage Return in perl scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/carriage-return-in-perl-scripts/m-p/4728380#M655477</link>
      <description>HI (again) Peter:&lt;BR /&gt;&lt;BR /&gt;By the way, aside from using 'dos2ux' on your HP platform you could (of course) do:&lt;BR /&gt;&lt;BR /&gt;# perl -pi.old -e 's/\r$//' file&lt;BR /&gt;&lt;BR /&gt;...which will strip carriage returns from the CRLF pairs, updating your file (script or whatever) in-place and retaining an original file copy as "*.old".&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 20 Dec 2010 12:51:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/carriage-return-in-perl-scripts/m-p/4728380#M655477</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-12-20T12:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Carriage Return in perl scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/carriage-return-in-perl-scripts/m-p/4728381#M655478</link>
      <description>&lt;!--!*#--&gt;thanks everyone for your reply&lt;BR /&gt;&lt;BR /&gt;I think I made a mistake.&lt;BR /&gt;&lt;BR /&gt;the file on the linux machine and the HP-UX machine are identical&lt;BR /&gt;&lt;BR /&gt;and the file on the HP-UX machine does not have ^M in it&lt;BR /&gt;&lt;BR /&gt;I just did scp from the linux to HP-UX, back to linux and then back to HP-UX, still no ^M&lt;BR /&gt;&lt;BR /&gt;here's the script if you're curious</description>
      <pubDate>Mon, 20 Dec 2010 16:05:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/carriage-return-in-perl-scripts/m-p/4728381#M655478</guid>
      <dc:creator>Peter Brimacombe</dc:creator>
      <dc:date>2010-12-20T16:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Carriage Return in perl scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/carriage-return-in-perl-scripts/m-p/4728382#M655479</link>
      <description>scp does not have an "ASCII" or "BINARY" option -- all transfers are exact copies. ftp uses the BINARY option to achieve an exact copy.</description>
      <pubDate>Mon, 20 Dec 2010 18:31:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/carriage-return-in-perl-scripts/m-p/4728382#M655479</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2010-12-20T18:31:35Z</dc:date>
    </item>
  </channel>
</rss>

