in reply to Re: list references
in thread list references
...and for the second...greg@sparky:~/test$ cat enlil1 #!/usr/bin/perl use Data::Dumper; use strict; use warnings; my $ref=\(1..3); my $oth_ref = \(1,2,3); print Dumper $ref,$oth_ref greg@sparky:~/test$ ./enlil1 $VAR1 = [ 1, 2, 3 ]; $VAR2 = \3;
Here's what my 'perl -V' looks like...greg@sparky:~/test$ cat enlil2 #!/usr/bin/perl use Data::Dumper; use strict; use warnings; my @array = \(1 .. 3, 5 ..9); my @array2 = \(1,2,3,5,6,7,8,9); my @array3 = (\(1 ..3),\(5,6,7,8,9)); print Dumper \@array,\@array2,\@array3; greg@sparky:~/test$ ./enlil2 $VAR1 = [ [ 1, 2, 3 ], [ 5, 6, 7, 8, 9 ] ]; $VAR2 = [ \1, \2, \3, \5, \6, \7, \8, \9 ]; $VAR3 = [ [ 1, 2, 3 ], \5, \6, \7, \8, \9 ];
greg@sparky:~/test$ perl -V Summary of my perl5 (revision 5.0 version 8 subversion 0) configuratio +n: Platform: osname=linux, osvers=2.4.21, archname=i486-linux uname='linux midas 2.4.21 #6 sat jun 14 22:48:45 pdt 2003 i686 unk +nown unknown gnulinux ' config_args='-de -Dprefix=/usr -Dcccdlflags=-fPIC -Darchname=i486- +linux' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultipl +icity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FIL +E_OFFSET_BITS=64', optimize='-O3', cppflags='-fno-strict-aliasing' ccversion='', gccversion='3.2.3', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lc -lcrypt -lutil perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil libc=/lib/libc-2.3.2.so, so=so, useshrplib=false, libperl=libperl. +a gnulibc_version='2.3.2' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynami +c' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under linux Compiled at Aug 19 2003 15:52:31 @INC: /usr/lib/perl5/5.8.0/i486-linux /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i486-linux /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .
|
|---|