in reply to Trash in my prints

print() in mod_perl adds a trailing newline. Try using binmode with the filehandle.

binmode STDOUT; print '1';

Good luck,
Luke Jefferson

Replies are listed 'Best First'.
Re^2: Trash in my prints
by DrHyde (Prior) on Aug 19, 2011 at 11:25 UTC
    That's a bug in mod_perl. Even if it's documented, it's still a bug. It's a bug in the design.

      That's a bug in mod_perl. Even if it's documented, it's still a bug. It's a bug in the design.

      It is neither

      It is a perl feature, see binmode

        Really? *My* perl doesn't go adding nonsense onto the end of my print()s unless I tell it to:
        $ perl -e 'print "foo"'|hexdump -C 00000000 66 6f 6f ... |foo| 00000003
        binmode() makes no difference.