in reply to Re^4: Two more Features Perl 5 Maybe Needs
in thread Five Features Perl 5 Needs Now
Waitasecond. So is your €arr the array referenced by $arr or the array @arr or what??? Or is it a whole different variable? In that case what does each of those mean?
The first is making an alias €one to the array @two? The second copying all values referenced by €two to @one? The third copying all elements of @two to @one? The fourth setting €one to point to the same array €two points to? The fifth god only knows what?€one = @two; @one = €two; @one = @two; €one = €two; €one = \@two;
This is one of the cases when I disagree with PBP (it's allowed), I do not use any such suffixes and do not ever remember being bitten by that.
An ocassional @{} is necessary. Just as is an ocassional ( ) in expressions. Suppose you have this @¥hash{foo,bar}[2], what does the @ belong to? Is it @{¥hash{foo,bar}}[2] or @{¥hash{foo,bar}[2]}? Do we want the second element of the array referenced by the value of the ('foo'.$;.'bar') key of the hash referenced by ¥hash or the array referenced by the second element of the hash slice?
I would not worry about what character to use, I'd rather worry about what are all the rules governing the intended use and whether the result is not way too complex.
P.S.: You said you are sometimes using _cref ... looks like you'd need (at least) one more sigil. For the coderefs. And then scalar refs and maybe object refs ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Two more Features Perl 5 Maybe Needs
by LanX (Saint) on Dec 23, 2008 at 23:00 UTC |