http://qs1969.pair.com?node_id=554441

jesuashok has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: write() removes trailing spaces
by Joost (Canon) on Jun 09, 2006 at 10:22 UTC
    Given that formats are intended to create plain text printable reports, removing trailing spaces certainly makes sense, if only for efficiency.

    But indeed, it might be a good idea to document that somewhere (I havent searched everywhere, but it doesn't appear to be documented right now). If it's really undocumented, you could write a documentation patch and submit it to the perl5 porters.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: write() removes trailing spaces
by ioannis (Abbot) on Jun 09, 2006 at 08:35 UTC
    There is nothing strange. The following altered code demonstrates that your $c variable contains 13 chars , which you want displayed within 11 space holders (1+10). Two chars werer choped, as per your request .
    format STDOUT = @<<<<@<<<<@<<<<<<<<<<END $a, $b, $c . $a = "a"; $b = "b"; $c = "c .bc"; print 'len=',length $c; write(STDOUT);

    Produces this output:

    len=13 a b c .END
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: write() removes trailing spaces (plagiarized)
by shmem (Chancellor) on Oct 09, 2006 at 09:28 UTC
    Ripped from p5p.

    Original post is here.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}