Re: Bulk assignment to list of references

2008-08-19 Thread Perry Smith
On Aug 19, 2008, at 1:43 PM, Paul Lalli wrote: On Aug 19, 11:16 am, [EMAIL PROTECTED] (Perry Smith) wrote: My friend is trying to do this: #!/bin/perl $a = 1; $b = 2; $c = 3; @l = ( \$a, \$b, \$c ); # This is the line we need help with # Is there a way to tell Perl that @l[0] is a referenc

Re: Bulk assignment to list of references

2008-08-19 Thread Paul Lalli
On Aug 19, 11:16 am, [EMAIL PROTECTED] (Perry Smith) wrote: > My friend is trying to do this: > > #!/bin/perl > > $a = 1; > $b = 2; > $c = 3; > > @l = ( \$a, \$b, \$c ); > > # This is the line we need help with > # Is there a way to tell Perl that @l[0] is a reference > # and we want to assign what

Bulk assignment to list of references

2008-08-19 Thread Perry Smith
My friend is trying to do this: #!/bin/perl $a = 1; $b = 2; $c = 3; @l = ( \$a, \$b, \$c ); # This is the line we need help with # Is there a way to tell Perl that @l[0] is a reference # and we want to assign what it refers to the number 4. # i.e. ${$l[0]} = 4; # but for the whole list in @l (