in reply to Why doesn't this print when i omit the newline?

Because $value ends with a Carriage Return, the second line overwrites the first.

Replies are listed 'Best First'.
Re^2: Why doesn't this print when i omit the newline?
by tobyink (Canon) on Dec 16, 2014 at 14:48 UTC
Re^2: Why doesn't this print when i omit the newline?
by karlgoethebier (Abbot) on Dec 16, 2014 at 15:04 UTC

    D'oh! That hurts!

    Best regards and thank you, Karl

    «The Crux of the Biscuit is the Apostrophe»

      See Data::Dumper's Useqq option, or Data::Dump:

      $ perl -MData::Dumper \ -le '$Data::Dumper::Useqq=1; print Dumper("foo\r\n")' $VAR1 = "foo\r\n"; $ perl -MData::Dump=pp -le 'print pp("foo\r\n")' "foo\r\n"
Re^2: Why doesn't this print when i omit the newline?
by Laurent_R (Canon) on Dec 16, 2014 at 18:46 UTC
    Reading the thread, I was also going to suggest this possibility, if ikegami had not done it before, because I had the same problem a couple of months ago and it took me at least 30 minutes to figure out that the line that appeared not to be printed was in fact overwritten by the next line (data produced on Windows and used on a Unix box, so that chomp removed the \n but not the \r).

      “Oooohhhh...!! Wick-ed!”