I tried to reproduce this using your code.

My data:

Perl er et fortolket højniveau-programmeringssprog. Perl blev skabt i +1987 af Larry Wall under Unix for at gøre rapportering lettere. Siden + 1987 har Perl undergået store forandringer og er i dag et generelt a +nvendeligt programmeringssprog som kan afvikles på flere forskellige +platformer, herunder bl.a. Windows og Unix. Perl tilbyder kraftfuld t +eksthåndterings-mekanismer som ikke ses lige i noget andet programmer +ingssprog, bl.a. ved hjælp af regulære udtryk. Perl har modsat de fle +ste almindelige programmeringssprog ikke nogen begrænsning mht. længd +er på data. Perl ses oftest brugt i forbindelse med webside programme +ring (CGI scripts, Common Gateway Interface). Som webside-programmeri +ngssprog konkurrerer Perl især mod sprog som PHP, Ruby og Pyton. Perl + bliver ofte refereret til som "The Swiss Army chainsaw of programmin +g languages" pga. sin fleksibilitet og generelle anvendelighed.

My Perl version is v5.12.3 built for darwin-thread-multi-level2

# ./danish.pl == your code Karls-Mac-mini:Desktop karl$ ./danish.pl danish.txt > out.txt Karl-Mac-mini:Desktop karl$ diff danish.txt out.txt #...seems like it's OK

What is your original data? Regards, Karl

«The Crux of the Biscuit is the Apostrophe»


In reply to Re: how to get exactly same text from a file by karlgoethebier
in thread how to get exactly same text from a file by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.