in reply to RFC: Is there more to alias?
Clarification, please: Would
@x = @y alias @x to @y, so push/shift/clear/whatever done to one would affect the other, while @x[0..$#x] = @y[0..$#y] would alias only the array elements, not the whole array, so that push/shift/clear/whatever done to one array would leave the other unaffected?
Re^2: RFC: Is there more to alias?
by xmath (Hermit) on Aug 25, 2004 at 08:53 UTC
|
Yes.
Note that alias @x[0..$#x] = @y[0..$#y] would only do what you probably want when $#x == $#y. If you simply want to replace the contents of @x with aliases, use alias +(@x) = @y (or perhaps alias((@x) = @y), matter of taste) | [reply] [d/l] [select] |
|