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

[perl #29581] glob() misses a lot of matches

From:
Marek Rouchal
Date:
May 14, 2004 06:17
Subject:
[perl #29581] glob() misses a lot of matches
Message ID:
rt-3.0.9-29581-87417.18.6630410501351@perl.org
# New Ticket Created by  Marek Rouchal 
# Please include the string:  [perl #29581]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=29581 >


This is a bug report for perl from marek.rouchal@gmx.net,
generated with the help of perlbug 1.35 running under perl v5.8.4.


-----------------------------------------------------------------
[Please enter your report here]

In a somewhat complex file structure, Perl's glob() fails to find a lot
of matches, which are easily listed with e.g. tcsh's internal glob,
as the following example shows (note: my UNIX account is neither 
lmadmin nor in the lmadmin group, see ls -l output below):

########
# first I list with tcsh. See the three stars in the glob?
########
$ ls -1dF
/opt/lic/share/license/site/cadadm/*/*_lic*
/opt/lic/share/license/site/cadadm/ads/ads_lic
/opt/lic/share/license/site/cadadm/ads2002/ads2002_lic
/opt/lic/share/license/site/cadadm/ads2002_eval/ads2002_eval_lic
/opt/lic/share/license/site/cadadm/ads2002_eval/ads2002_eval_lic.8086075C@
/opt/lic/share/license/site/cadadm/ads_eval/ads_eval_lic
/opt/lic/share/license/site/cadadm/advantest/advantest_lic
/opt/lic/share/license/site/cadadm/ansoft_hfss/ansoft_hfss_lic
/opt/lic/share/license/site/cadadm/ansys_5.7/ansys_5.7_lic
/opt/lic/share/license/site/cadadm/aquarius/aquarius_lic
/opt/lic/share/license/site/cadadm/aquarius_eval/aquarius_eval_lic
/opt/lic/share/license/site/cadadm/aquarius_eval/aquarius_eval_lic.8086075c@
/opt/lic/share/license/site/cadadm/arc_eval/arc_eval_lic
/opt/lic/share/license/site/cadadm/arc_metaware_eval/arc_metaware_eval_lic
/opt/lic/share/license/site/cadadm/armads/armads_lic
/opt/lic/share/license/site/cadadm/artwork/artwork_lic
/opt/lic/share/license/site/cadadm/atrenta/atrenta_lic
/opt/lic/share/license/site/cadadm/axys_maxsim/axys_maxsim_lic
/opt/lic/share/license/site/cadadm/bindkey/bindkey_lic
/opt/lic/share/license/site/cadadm/bindkey_eval/bindkey_eval_lic
/opt/lic/share/license/site/cadadm/cats/cats_lic
/opt/lic/share/license/site/cadadm/cds/cds_lic_file
/opt/lic/share/license/site/cadadm/cds/cds_lic_file.8090c43d@
/opt/lic/share/license/site/cadadm/cds/cds_lic_file.8096260c@
/opt/lic/share/license/site/cadadm/cds/cds_lic_file.8318e7a9@
/opt/lic/share/license/site/cadadm/cds_eval/cds_eval_lic
/opt/lic/share/license/site/cadadm/celoxica/celoxica_lic
/opt/lic/share/license/site/cadadm/coware/coware_lic
/opt/lic/share/license/site/cadadm/cve2/cve2_lic
/opt/lic/share/license/site/cadadm/debussy/debussy_lic
/opt/lic/share/license/site/cadadm/debussy_eval/debussy_eval_lic
/opt/lic/share/license/site/cadadm/denali/denali_lic
/opt/lic/share/license/site/cadadm/designplanner/designplanner_lic
/opt/lic/share/license/site/cadadm/designsync/designsync_lic
/opt/lic/share/license/site/cadadm/dolphin/dolphin_lic
/opt/lic/share/license/site/cadadm/flexadmin/flexadmin_lic
/opt/lic/share/license/site/cadadm/flomerics/flomerics_lic
/opt/lic/share/license/site/cadadm/forte/forte_lic@
/opt/lic/share/license/site/cadadm/frame/frame_5.5_lic
/opt/lic/share/license/site/cadadm/frame/frame_lic
/opt/lic/share/license/site/cadadm/goepel/goepel_lic
/opt/lic/share/license/site/cadadm/hsim_eval/hsim_eval_lic
/opt/lic/share/license/site/cadadm/infineon/infineon_lic
/opt/lic/share/license/site/cadadm/infineon_eval/infineon_eval_lic
/opt/lic/share/license/site/cadadm/infineon_eval/infineon_eval_lic.8086075c@
/opt/lic/share/license/site/cadadm/innologic/innologic_lic
/opt/lic/share/license/site/cadadm/lang/lang_lic@
/opt/lic/share/license/site/cadadm/lang2/lang2_lic@
/opt/lic/share/license/site/cadadm/lsf/lsf_lic
/opt/lic/share/license/site/cadadm/magma/magma_lic
/opt/lic/share/license/site/cadadm/magma_eval/magma_eval_lic
/opt/lic/share/license/site/cadadm/magma_eval/magma_eval_lic.8086075c@
/opt/lic/share/license/site/cadadm/mathematica/mathematica_lic_4.0
/opt/lic/share/license/site/cadadm/matlab/matlab_lic
/opt/lic/share/license/site/cadadm/mds_eval/mds_eval_lic
/opt/lic/share/license/site/cadadm/mentor_8.2/mentor_8.2_lic
/opt/lic/share/license/site/cadadm/mentor_8.2_dms/mentor_8.2_dms_lic
/opt/lic/share/license/site/cadadm/mentor_8.2_eval/mentor_8.2_eval_lic
/opt/lic/share/license/site/cadadm/mentor_8.2_eval/mentor_8.2_eval_lic.8086075c@
/opt/lic/share/license/site/cadadm/mentor_8.2_wan/mentor_8.2_wan_lic
/opt/lic/share/license/site/cadadm/merlin/merlin_lic
/opt/lic/share/license/site/cadadm/metrowerks/metrowks_lic
/opt/lic/share/license/site/cadadm/mldesigner/mldesigner_lic
/opt/lic/share/license/site/cadadm/muneda/muneda_lic
/opt/lic/share/license/site/cadadm/muneda_eval/muneda_eval_lic
/opt/lic/share/license/site/cadadm/ndrc/ndrc_lic
/opt/lic/share/license/site/cadadm/prolific_eval/prolific_eval_lic
/opt/lic/share/license/site/cadadm/raphael/raphael_lic
/opt/lic/share/license/site/cadadm/rational/rational_lic
/opt/lic/share/license/site/cadadm/saber_4.0/saber_4.0_lic
/opt/lic/share/license/site/cadadm/sagantec/sagantec_lic
/opt/lic/share/license/site/cadadm/sequence/sequence_lic
/opt/lic/share/license/site/cadadm/sequence_eval/sequence_eval_lic
/opt/lic/share/license/site/cadadm/sicat_32_eval/sicat_32_eval_lic
/opt/lic/share/license/site/cadadm/sicat_64_eval/sicat_64_eval_lic
/opt/lic/share/license/site/cadadm/sicat_yrs/sicat_yrs_lic
/opt/lic/share/license/site/cadadm/signalscan/signalscan_lic
/opt/lic/share/license/site/cadadm/simplex/simplex_lic
/opt/lic/share/license/site/cadadm/snps/snps_lic
/opt/lic/share/license/site/cadadm/snps_eval/snps_eval_lic
/opt/lic/share/license/site/cadadm/solid/solid_lic
/opt/lic/share/license/site/cadadm/sparcworks/sparcworks_lic
/opt/lic/share/license/site/cadadm/specman/specman_lic
/opt/lic/share/license/site/cadadm/specman_eval/specman_eval_lic
/opt/lic/share/license/site/cadadm/specman_eval/specman_eval_lic.8086075c@
/opt/lic/share/license/site/cadadm/speed/speed_lic
/opt/lic/share/license/site/cadadm/sunwspro_4.2/sunwspro_4.2_lic@
/opt/lic/share/license/site/cadadm/syncad/syncad_lic
/opt/lic/share/license/site/cadadm/synopsys/synopsys_lic
/opt/lic/share/license/site/cadadm/synopsys/synopsys_lic_tmp
/opt/lic/share/license/site/cadadm/synplicity/synplicity_lic
/opt/lic/share/license/site/cadadm/tcad/tcad_lic
/opt/lic/share/license/site/cadadm/teaklite/teaklite_lic
/opt/lic/share/license/site/cadadm/teaklite/teaklite_lic.8090c43d@
/opt/lic/share/license/site/cadadm/teradit/teradit_lic
/opt/lic/share/license/site/cadadm/teradyne/teradyne_lic
/opt/lic/share/license/site/cadadm/teradyne/teradyne_lic.8093ba8f
/opt/lic/share/license/site/cadadm/tops/tops_lic
/opt/lic/share/license/site/cadadm/undertow_eval/undertow_eval_lic
/opt/lic/share/license/site/cadadm/vast/vast_lic
/opt/lic/share/license/site/cadadm/viragelogic/viragelogic_lic
/opt/lic/share/license/site/cadadm/virtuallogic/virtuallogic_lic
/opt/lic/share/license/site/cadadm/vnavigator/vnavigator_lic
/opt/lic/share/license/site/cadadm/vnavigator_eval/vnavigator_eval_lic
/opt/lic/share/license/site/cadadm/vtip/vtip_lic
/opt/lic/share/license/site/cadadm/wattwatcher/wattwatcher_lic
/opt/lic/share/license/site/cadadm/windriver/windriver_lic
/opt/lic/share/license/site/cadadm/xvw/xvw_lic

########
# now with Perl
########
$ /opt/perl_5.8.4/bin/perl -e 'print map {"$_\n"}
glob("/opt/lic/share/license/site/cadadm/*/*_lic*")'

/opt/lic/share/license/site/cadadm/mentor_8.2/mentor_8.2_lic
/opt/lic/share/license/site/cadadm/undertow_eval/undertow_eval_lic
/opt/lic/share/license/site/cadadm/merlin/merlin_lic
/opt/lic/share/license/site/cadadm/sequence_eval/sequence_eval_lic
/opt/lic/share/license/site/cadadm/cds/cds_lic_file.8090c43d
/opt/lic/share/license/site/cadadm/cds/cds_lic_file
/opt/lic/share/license/site/cadadm/cds/cds_lic_file.8096260c
/opt/lic/share/license/site/cadadm/cds/cds_lic_file.8318e7a9
/opt/lic/share/license/site/cadadm/coware/coware_lic
/opt/lic/share/license/site/cadadm/celoxica/celoxica_lic
/opt/lic/share/license/site/cadadm/speed/speed_lic
/opt/lic/share/license/site/cadadm/synopsys/synopsys_lic
/opt/lic/share/license/site/cadadm/synopsys/synopsys_lic_tmp

########
# I cannot see an obvious difference between a found and a
# not-found directory (first was not found):
########
$ ls -la /opt/lic/share/license/site/cadadm/vnavigator_eval/
total 56
drwxr-sr-x   3 lmadmin  lmadmin     4096 Mar 21 13:56 ./
drwxrwsr-x 110 lmadmin  lmadmin     8192 May  4 18:23 ../
drwxr-s---   2 lmadmin  lmadmin     4096 Nov 12  2003 SAVE-TMP/
-rw-r-----   1 lmadmin  lmadmin      532 Mar 21 13:51 vnavigator_eval.opt
-rw-r--r--   1 lmadmin  lmadmin     2133 Nov 12  2003 vnavigator_eval_lic
-rw-r-----   1 lmadmin  lmadmin     2133 Nov 12  2003 vnavigator_eval_new

$ ls -la /opt/lic/share/license/site/cadadm/synopsys/
total 184
drwxr-sr-x   3 lmadmin  lmadmin     4096 Mar 21 13:56 ./
drwxrwsr-x 110 lmadmin  lmadmin     8192 May  4 18:23 ../
-rw-r-----   1 lmadmin  lmadmin      147 Mar 19  2003 .la_dmon.opt
-rw-r-----   1 lmadmin  lmadmin      148 Mar 19  2003 .synopsys.opt
-rw-r-----   1 lmadmin  lmadmin    13249 Dec  1 09:25 .synopsys_lic
drwxr-sr-x   2 lmadmin  lmadmin    12288 Dec  1 09:25 SAVE-TMP/
-rw-r-----   1 lmadmin  lmadmin      479 Mar 21 13:51 la_dmon.opt
-rw-r-----   1 lmadmin  lmadmin      480 Mar 21 13:51 synopsys.opt
-rw-r--r--   1 lmadmin  lmadmin    12930 Mar 10 12:28 synopsys_lic
-rw-r--r--   1 lmadmin  lmadmin      152 Dec 15 11:03 synopsys_lic_tmp
-rw-r-----   1 lmadmin  lmadmin    12930 Mar  1 16:07 synopsys_new


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

Configured by hwadm at Fri May  7 15:10:49 MEST 2004.

Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  Platform:
    osname=solaris, osvers=2.8, archname=sun4-solaris-thread-multi
    uname='sunos oak 5.8 generic_117000-01 sun4u sparc sunw,ultra-60 '
    config_args='-Dprefix=/opt/perl_5.8.4 -Dmydomain=.muc.infineon.com
-Dcf_email=perl@muc.infineon.com -Dinstallusrbinperl=undef
-Dperl5=/opt/perl_5.8.4/bin/perl -Dsitebin=/opt/perl_5.8.4/bin
-Dman1dir=/opt/perl_5.8.4/share/man/man1
-Dman3dir=/opt/perl_5.8.4/share/man/man3 -Dperladmin=perl@muc.infineon.com
-Dprivlib=/opt/perl_5.8.4/share/lib -Dscriptdir=/opt/perl_5.8.4/share/bin
-Dsitescript=/opt/perl_5.8.4/share/bin -Dsitelib=/opt/perl_5.8.4/share/lib
-Ubincompat5005 -Dlibperl=libperlifx.so -Dcc=gcc -Doptimize=-O2
-Dldflags=-static-libgcc -Dlddlflags=-G -static-libgcc
-Darchlib=/opt/perl_5.8.4/lib/sun4-solaris-thread-multi
-Dsitearch=/opt/perl_5.8.4/lib/sun4-solaris-thread-multi
-Dlocincpth=/home/hwadm/TWW/SOL/include -Dloclibpth=/home/hwadm/TWW/SOL/lib
-Dglibpth=/usr/lib -Duseshrplib -Dusethreads -Dpager=/usr/local/bin/less
-des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -fno-strict-aliasing
-I/home/hwadm/TWW/SOL/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-D_REENTRANT -fno-strict-aliasing
-I/home/hwadm/TWW/SOL/include'
    ccversion='', gccversion='3.2.3', gccosandvers='solaris2.8'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    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, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags ='-static-libgcc -L/home/hwadm/TWW/SOL/lib '
    libpth=/home/hwadm/TWW/SOL/lib /usr/lib
    libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lpthread -lc
    perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc
    libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperlifx.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -R
/opt/perl_5.8.4/lib/sun4-solaris-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-G -static-libgcc
-L/home/hwadm/TWW/SOL/lib'

Locally applied patches:
    

---
@INC for perl v5.8.4:
    /opt/perl_5.8.4/lib/sun4-solaris-thread-multi
    /opt/perl_5.8.4/share/lib
    /opt/perl_5.8.4/lib/sun4-solaris-thread-multi
    /opt/perl_5.8.4/share/lib
    /opt/perl_5.8.4/share/lib
    .

---
Environment for perl v5.8.4:
    HOME=/home/relman
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/usr/openwin/lib:/usr/lib:/usr/dt/lib
    LOGDIR (unset)
   
PATH=/opt/perl_5.8.4/bin:/var/vob/relman/libspec/vob/bin:/opt/frame_6.0/bin:/opt/frame_6.0/webworks/bin:/usr/openwin/bin:/usr/openwin/demo:/usr/atria/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/ssh/bin:.:/home/relman/bin:/home/hwadm/bin:/usr/ucb:/opt/TWWfsw/bin:/usr/local/bin:/opt/acroread_5.0.8/bin
    PERL_BADLANG (unset)
    SHELL=/bin/csh

-- 
NEU : GMX Internet.FreeDSL
Ab sofort DSL-Tarif ohne Grundgeb�hr: http://www.gmx.net/dsl




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