What I am about to raise, I do so more out of wanting someone to educate me than disagreeing for the sake of. The *that syntax shown below is unfamiliar to me outside the context of referencing a filehandle in a subroutine params list, where it is optional (ie., &some_sub(*STDIN)). *that reminds me an awful lot of a C pointer, however. Can someone clear this up for me?
I found the following in the Camel 3rd edition, page 257, which, though I may be wrong, looks like it does what is requested? @reflist = \(@x); #interpolate array, then get refs which looks an awful lot like @array2 = \(@array1); >===== Original Message From <[EMAIL PROTECTED]> ===== >On Jul 22, chris said: > >>I have two variables (@array1 and @array2). @array1 will be >>initialized with a list of values. Is it possible to declare @array2 >>in such a way that it will reference @array1? > >If @array2 is a package variable (not a my() variable), you can do: > > @this = qw( once upon a time ); > *that = \@this; > $that[0] = "Once"; > $this[3] = "frog"; > >Now @this and @that are ("Once", "upon", "a", "frog"). > > *that = \@this; > >makes @that an alias for @this. > >-- >Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ >RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ >** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** ><stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. >[ I'm looking for programming work. If you like my work, let me know. ] > > >-- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] "I think for my lunch tomorrow I'll make a tuna and pickle triangle bunwich." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]