Re: improving my code: array of references

2007-04-27 Thread Pierre Mariani
On Fri, 2007-04-27 at 14:26 -0400, Matthew J. Avitable wrote: > Pierre, > >> Thank you, but I got it to work the way I wanted, thanks to Matthew and > >> Rob's posts: > >> > >> map { modify_variable(${$_}) } = \($var1, $var2, $var3); > >> > > To annotate to what Paul said - the above won't wo

Re: improving my code: array of references

2007-04-27 Thread Pierre Mariani
On Fri, 2007-04-27 at 12:45 -0400, Chas Owens wrote: > On 4/27/07, Pierre Mariani <[EMAIL PROTECTED]> wrote: > > On Fri, 2007-04-27 at 12:03 -0400, Chas Owens wrote: > > > On 4/27/07, Pierre Mariani <[EMAIL PROTECTED]> wrote: > > > snip > > >

Re: improving my code: array of references

2007-04-27 Thread Pierre Mariani
On Fri, 2007-04-27 at 12:03 -0400, Chas Owens wrote: > On 4/27/07, Pierre Mariani <[EMAIL PROTECTED]> wrote: > snip > > > - modify_variable() doesn't appear to modify anything, otherwise why > > > are you assigning its return value to the scalar passed as a par

Re: improving my code: array of references

2007-04-27 Thread Pierre Mariani
Matthew and Rob, thank you for your replies. > - It's unclear whether you have a fixed set of variables to process. > Is > the list always the same? Yes, the list is always the same. > - Why are you using references? Are you sure you need to? > > - modify_variable() doesn't appear to modify

Re: improving my code: array of references

2007-04-26 Thread Pierre Mariani
> # $var1, $var2 and $var3 are set previously > > > for ( \$var1, > >\$var2, > >\$var3, > >) > > > > { > >${$_} = modify_variable ( ${$_} ); > > } > > > > Questions: > > - How do I improve my array definition? > > - How to I call the modify_

improving my code: array of references

2007-04-26 Thread Pierre Mariani
Hello everyone, I have a 'modify_variable' function that, well, modifies a variable. I want to run it on several variables. I have the following code that: - builds an array of references on the variables, - calls the function on the content of the reference, - set the content of the reference t