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

For clarification: You mean it doesn't print anything at all?? What I am seeing is this:

0 use strict;0 use strict; 1 use warnings;1 use warnings; ...

And inspecting $index and $value seems to show that they are plain scalars and not objects with overloaded stringification. Are you printing to STDOUT or a file? Are you using select at all, or perhaps some other part of your program is?

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

    The first print should print everything on one line and the second all the lines (with newline), as obsevered by toolic at Re: Why doesn't this print when i omit the newline?.

    I print to STDOUT and don't use select.

    I don't do anything else in my code - it's as shown in the example.

    Thank you and best regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

      Sorry, can't reproduce on Linux / v5.20 / IO::All v0.85. So I'll just throw out a couple more debugging guesses...

      If you replace my $io = io $0; with my $io = [qw/foo bar/]; (and perhaps drop the use IO::All;) I hope it works?

      Have you tried opening something other than $0?