> # $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_variable function in a more elegant way?

> > Perfect canidate for Map.

Thanks for that.
So now I have:


my @tmp = ( $var1, $var2, $var3 );
@tmp = map modify_variable, @tmp;


which is better.

I don't think I can use references anymore using this method, but anyone know 
how to create an array of references?

Thanks


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to