develooper Front page | perl.perl5.porters | Postings from July 2001

RE: aliasing a value [...]

Brent Dax
July 24, 2001 17:05
RE: aliasing a value [...]
Message ID:
>"Sterin, Ilya" wrote:
>> alias(%foo, %bar) is better IMO since it conforms to other functions in
>> perl.
>> my %foo is alias = %bar;  #seems a little out of scope of the language,
>> unless more functionality is implemented in that way.
>> Ilya

>Is there a problem with the following?  Besides that it doesn't work
>like I want it to?  Am I mistaken in believing that it is a clear,
>concise and unambiguous way to request assignment of a symbol to
>be an alias to another?

>	my \%foo = \%bar;

>(And besides that it extends p5 syntax instead of being apo2-compliant?)

That makes perfect sense to me.  I've always wondered why the backslash
operator wasn't lvaluable.  (Doesn't C++ have something like this with its
unary-& operator?)

--Brent Dax Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About