in reply to Working with references to scalars
is very simple and clear and easily understood. I'm sure some people will disagree with me here, but IMHO doingmy $string = get_string(); put_string_ref(\$string);
is at least somewhat obfuscated. It kind of begs the question "What am I passing to put_string_ref? Is it a reference to the get_string subroutine, or is it a reference to the string that get_string returns?". It is not absolutely clear looking at that code *what* is being passed to put_string_ref.put_string_ref(\get_string())
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Working with references to scalars
by cees (Curate) on May 09, 2003 at 19:52 UTC |