develooper Front page | perl.perl5.porters | Postings from May 2004

[perl #29713] problem with calling glob in scalar context multiple times

From:
Jeffrey . H . Mitchell @ frb . gov
Date:
May 19, 2004 07:18
Subject:
[perl #29713] problem with calling glob in scalar context multiple times
Message ID:
rt-3.0.9-29713-87790.10.9744113231481@perl.org
# New Ticket Created by  Jeffrey.H.Mitchell@frb.gov 
# Please include the string:  [perl #29713]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=29713 >


This is a bug report for perl from jmitchell@frb.gov,
generated with the help of perlbug 1.28 running under perl v5.6.0.


-----------------------------------------------------------------
[Please enter your report here]
Running the code:

for (qw(~ ~)) {
  my $expanded = glob($_);
  print "scalar: $expanded\n";
  ($expanded) = glob($_);
  print "list: $expanded\n";
}

Gives the output:

scalar: /eim/home/m1jhm01
list: /eim/home/m1jhm01
scalar:
list: /eim/home/m1jhm01

If called more times, it alternates between working and not working when
called in scalar context.

I have version 0.991 of File::Glob installed, while search.cpan.org tells
me that the current version is 1.02.  Arguably it is a more serious bug
that I cannot figure out how to view the Changes file for File::Glob on
search.cpan.org or apparently install the latest version of File::Glob
without installing all of Perl.  Hence, I do not know whether this bug has
already been fixed.

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=low
---
Site configuration information for perl v5.6.0:

Configured by m1klk99 at Wed Mar 29 09:00:37 EST 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris
    uname='sunos arcmx1 5.6 generic_105181-16 sun4u sparc sunw,ultraax-mp '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='cc', optimize='-O', gccversion=
    cppflags='-I/usr/gnu/include -I/opt/gnu/include'
    ccflags ='-I/usr/gnu/include -I/opt/gnu/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib -L/opt/local/lib -L/usr/gnu/lib
-L/opt/gnu/lib -L/opt/SUNWwsf/SUNWspro/SC4.2/lib '
    libpth=/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib
/opt/SUNWwsf/SUNWspro/SC4.2/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -lgdbm -ldl -lm -lc -lcrypt -lsec
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-KPIC', lddlflags='-G -L/usr/local/lib -L/opt/local/lib
-L/usr/gnu/lib -L/opt/gnu/lib -L/opt/SUNWwsf/SUNWspro/SC4.2/lib'

Locally applied patches:


---
@INC for perl v5.6.0:
    /usr/local/lib/perl5/5.6.0/sun4-solaris
    /usr/local/lib/perl5/5.6.0
    /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl/5.005/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.005
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl v5.6.0:
    HOME=/eim/home/m1jhm01
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)

PATH=/eim/home/m1jhm01/myperl/bin:/rsma/appl2/mysql/bin:/eim/home/m1jhm01/bin:/opt/local/bin:/opt/slocal/bin:/opt/X11R5/bin:/usr/openwin/bin:/opt/SUNWspro/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/ccs/lib:/opt/emacs/bin:/opt/gnu/bin:/opt/tex/tetex/bin:/opt/tex/bin:/opt/www/bin:/opt/fame/fame:/opt/rats/bin:/opt/sfw/bin:/usr/sfw/bin:/usr/ucb:/opt/frame4/bin:/opt/wm623/bin:/opt/wp60/wpbin:/opt/wp60/shbin10:/opt/ileaf5/bin


    PERL_BADLANG (unset)
    SHELL=/bin/tcsh





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