develooper Front page | perl.perl5.porters | Postings from November 2003

[perl #24457] write() removes trailing spaces

From:
Daniele Scarcella
Date:
November 10, 2003 15:55
Subject:
[perl #24457] write() removes trailing spaces
Message ID:
rt-24457-67281.16.1626785950246@rt.perl.org
# New Ticket Created by  "Daniele Scarcella (TEI)" 
# Please include the string:  [perl #24457]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24457 >


This is a bug report for perl from daniele.XX.scarcella@ericsson.com,
generated with the help of perlbug 1.26 running under perl 5.00503.


-----------------------------------------------------------------
[Please enter your report here]
There is a strange behaviour with the write() function, that is not documented:
a little program would be the best way to explain

format SOMETHING =
@<<<<@<<<<@<<<<<<<<<<
$a,  $b,  $c
.

$a = "a";
$b = "b";
$c = "c";
write(SOMETHING);

I'd expect something like this to be printed:

'a    b    c          '

What I get instead is

'a    b    c'

In the documentation there's no advice that trailing spaces will be automatically removed, nor a way to avoid that is descripted.

[Please do not change anything below this line]
-----------------------------------------------------------------

---
Site configuration information for perl 5.00503:

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=solaris, osvers=2.8, archname=sun4-solaris
    uname='sunos localhost 5.8 sun4u sparc sunw,ultra-1 '
    hint=previous, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-xO3 -xdepend', gccversion=
    cppflags=''
    ccflags =''
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =''
    libpth=/lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
    libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R /usr/perl5/5.00503/sun4-solaris/CORE'
    cccdlflags='-KPIC', lddlflags='-G'

Locally applied patches:
    

---
@INC for perl 5.00503:
    /usr/perl5/5.00503/sun4-solaris
    /usr/perl5/5.00503
    /usr/perl5/site_perl/5.005/sun4-solaris
    /usr/perl5/site_perl/5.005
    .

---
Environment for perl 5.00503:
    HOME=/export/home/qeidasc
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/sybase_db/OCS-12_5/lib
    LOGDIR (unset)
    PATH=/opt/sybase/SYBSsa8/bin:/opt/sybase/shared/sybcentral41:/sybase_db/OCS-12_5/bin:/sybase_db/OCS-12_5/bin:/sybase_db/releases/PurifyPlusFamily.2002a.06.00/sun4_solaris2/bin:/3pp/VBroker/bin:/usr:/usr/openwin/bin:/bin:/usr/bin:/usr/ccs/bin:/usr/sbin:/usr/ucb:/usr/etc:/etc:/usr/lib:/usr/opt/SUNWmd/sbin:.:/3pp/gzip-1.2.4:/opt/SUNWspro/bin:/opt/sybase/bin:/opt/sybooks/sybooks/unix/bin:/opt/pure/purify-4.5.1-solaris2:/opt/pure/purecov-4.5.1-solaris2:/opt/pure/quantify-4.5.1-solaris2:/3pp/jbuilder35/bin:/usr/atria/bin:/export/home/scmadm/UTIL/BIN:/export/home/scmadm/UTIL/PERL/UNIX:/usr/java/bin
    PERL_BADLANG (unset)
    SHELL=/bin/csh







nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About