Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.86k stars 528 forks source link

assoc array index strange acting #4475

Closed p5pRT closed 20 years ago

p5pRT commented 22 years ago

Migrated from rt.perl.org#7783 (status was 'resolved')

Searchable as RT7783$

p5pRT commented 22 years ago

From warrend@mdhost.cse.tek.com

Using a large assoc array indexing method I get a strangeness on a certain index.

HEre is the index value p $chips INPUT

First use it as a variable p ( defined $chip_power_info{$refdes}->{$path}->{$tpn}->{$pack_type}->{$file}->{$chips} ) (nothing printed)

Now print it as the value it contains p ( defined $chip_power_info{$refdes}->{$path}->{$tpn}->{$pack_type}->{$file}->{INPUT} ) 1

Is this a strange case of reserved word?

Perl Info ``` Flags: category=core severity=low Site configuration information for perl v5.6.1: Configured by warrend at Tue Jun 12 16:54:04 PDT 2001. Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=solaris, osvers=2.8, archname=sun4-solaris uname='sunos rosewood 5.8 generic_108528-03 sun4u sparc ' config_args='' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='gcc', ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O', cppflags='-fno-strict-aliasing' ccversion='', gccversion='2.95.3 20010315 (release)', 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, usemymalloc=y, prototype=define Linker and Libraries: ld='gcc', ldflags =' ' libpth=/usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldb -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -R /proj/wdt/gnu_sun5.8/perl-5.6.1/lib/5.6.1/sun4-solaris/CORE' cccdlflags='-fPIC', lddlflags='-G' Locally applied patches: @INC for perl v5.6.1: /proj/wdt/gnu_sun5.8/perl-5.6.1/lib/5.6.1/sun4-solaris /proj/wdt/gnu_sun5.8/perl-5.6.1/lib/5.6.1 /proj/wdt/gnu_sun5.8/perl-5.6.1/lib/site_perl/5.6.1/sun4-solaris /proj/wdt/gnu_sun5.8/perl-5.6.1/lib/site_perl/5.6.1 /proj/wdt/gnu_sun5.8/perl-5.6.1/lib/site_perl . Environment for perl v5.6.1: HOME=/login/warrend LANG=C LANGUAGE (unset) LD_LIBRARY_PATH=/tools/eda/ldv/bin:/proj/eda/disk3/ldv31baseline/tools/inca/lib:/proj/eda/disk3/ldv31baseline/tools/lib:/proj/eda/disk1/LMC_r41/lib/sun4Solaris.lib LOGDIR (unset) PATH=.:/proj/wdt/bin:/proj/wdt/sun5.8/bin:/proj/wdt/X.V11R6/sun5.8/bin:/login/warrend:/login/warrend/bin:/login/warrend/bin/sun5.8:/usr/ucb:/usr/openwin/bin:/usr/ccs/bin:/usr/bin:/etc:/usr/sbin:/tools/eda/fetools140/bin:/tools/eda/psd140/tools/bin:/tools/eda/psd140/tools/pcb/bin:/tools/eda/psd140/tools/dfII/bin:/tools/eda/psd140/tools/fet/bin:/tools/eda/cadtools140/bin:/tools/eda/ldv/bin:/proj/eda/disk3/ldv31baseline/tools/bin:/proj/eda/disk3/ldv31baseline/tools/inca/bin:/proj/eda/disk3/ldv31baseline/tools/dfII/bin:/proj/eda/97Aannex/vera-4.5-solaris2.5/bin:/proj/eda/annex2/debussy_5.0.9/bin:/stdapps/cms/bin PERL_BADLANG (unset) SHELL=/bin/tcsh ```
p5pRT commented 22 years ago

From @schwern

INPUT isn't a reserved word. I have a feeling it's a simple bug in your program or perhaps the debugger. If you could provide the code that produces the problem\, we can look into it.