in reply to list references
$ref=\(1..3);
This is in a SCALAR context .. it evaluates the list, and gets the value "3". It assigns a REFERENCE to this value to $ref. Hence $$ref will have the value 3.
To get an ARRAY, to do what I think you want, try this:
$ref = [1..3];
This generates an anonymous array REFERENCE , pointing to the array (1,2,3), and assigns that to $ref.
@$ref now is an array (1,2,3).
Offense, like beauty, is in the eye of the beholder, and a fantasy.
By guaranteeing freedom of expression, the First Amendment also guarantees offense.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: list references
by sleepingsquirrel (Chaplain) on Jun 15, 2004 at 23:48 UTC | |
by NetWallah (Canon) on Jun 16, 2004 at 16:01 UTC |