Perl / perl5

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

undef doesn't undefine a list #91

Closed p5pRT closed 20 years ago

p5pRT commented 24 years ago

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

Searchable as RT895$

p5pRT commented 24 years ago

From lcardali@dev2.hway.net

#!/usr/local/bin/perl

$aaa = "abc"; $bbb = "def";

print "Set \$aaa to [$aaa] and \$bbb to [$bbb]\n";

# if my can take a list\, why can't undef?

undef ($aaa\, $bbb);

if ( ! defined($aaa) ) {   print "Undefined \$aaa\n"; } else {   print "Variable \$aaa was NOT undefined\n"; }

if ( ! defined($bbb) ) {   print "Undefined \$bbb\n"; } else {   print "Variable \$bbb was NOT undefined\n"; }

Perl Info ``` This perlbug was built using Perl 5.00404 - Wed Dec 3 09:14:22 PST 1997 It is being executed now by Perl 5.00502 - Wed Sep 30 09:21:00 EDT 1998. Site configuration information for perl 5.00502: Configured by rford at Wed Sep 30 09:21:00 EDT 1998. Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration: Platform: osname=irix, osvers=6.5, archname=irix-n32-mips3 uname='irix64 nexus 6.4 02121744 ip27 ' hint=previous, useposix=true, d_sigaction=define usethreads=undef useperlio=define d_sfio=define Compiler: cc='cc -n32 -mips3', optimize='-O3', gccversion= cppflags='-D_BSD_TYPES -D_BSD_TIME -OPT:Olimit=0 -I/u/rford/buildperl/sfio/include -I/usr/local/include -DLANGUAGE_C' ccflags ='-D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -OPT:Olimit=0 -I/u/rford/buildperl/sfio/include -I/usr/local/include -DLANGUAGE_C' stdchar='unsigned char', d_stdstdio=undef, 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='ld', ldflags =' -L/usr/local/lib32 -L/usr/local/lib -L/u/rford/buildperl/sfio/lib' libpth=/usr/local/lib /usr/lib32 /lib32 /lib /usr/lib libs=-lgdbm -ldb -lm -lc -lsfio libc=/usr/lib32/libc.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-rpath,/usr/local/lib/perl5/5.00502/irix-n32-mips3/CORE' cccdlflags=' ', lddlflags='-n32 -shared -L/usr/local/lib32 -L/usr/local/lib -L/u/rford/buildperl/sfio/lib' Locally applied patches: @INC for perl 5.00502: /usr/local/lib/perl5/5.00502/irix-n32-mips3 /usr/local/lib/perl5/5.00502 /usr/local/lib/perl5/site_perl/5.005/irix-n32-mips3 /usr/local/lib/perl5/site_perl/5.005 . Environment for perl 5.00502: HOME=/u/lcardali LANG (unset) LD_LIBRARY_PATH=/usr/lib:/lib:/usr/local/lib:/u/sybase/OpenClient/IRIX/1004/lib:/u/sybase/OpenClient/IRIX/1004/lib LOGDIR (unset) PATH=/u/sybase/OpenClient/IRIX/1004/bin:/u/sybase/OpenClient/IRIX/1004/install:/u/lcardali/bin:/usr/sbin:/usr/bsd:/sbin:/usr/bin:/etc:/usr/etc:/usr/bin/X11:/u/httpd/bin:/usr/local/msql/bin:/u/bin:/usr/local/bin:/u/qmail/bin:/usr/local/mysql/bin:. PERL_BADLANG (unset) SHELL=/bin/ksh ```