in reply to [Perl 6] $ and @ - what is it coming to?
Most people have been happy to drop the indirection operator -> between elements of a nested structure:
my @a = ( [ 1,2 ], [3,4] ); print $a[1]->[0]; ## => 3 print $a[1][0]; ## same thing
This just extends that convenience to the first level of dereference.
You have to jump through hoops, (assigning the ref to a glob ref), to achieve the same thing in Perl 5.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: [Perl 6] $ and @ - what is it coming to?
by ruzam (Curate) on Mar 26, 2008 at 18:32 UTC | |
by BrowserUk (Patriarch) on Mar 26, 2008 at 18:59 UTC | |
by ruzam (Curate) on Mar 26, 2008 at 19:16 UTC | |
by chromatic (Archbishop) on Mar 26, 2008 at 23:48 UTC | |
by ruzam (Curate) on Mar 26, 2008 at 19:21 UTC | |
by BrowserUk (Patriarch) on Mar 26, 2008 at 19:34 UTC | |
by John M. Dlugosz (Monsignor) on Mar 27, 2008 at 04:30 UTC | |
| |
by moritz (Cardinal) on Mar 31, 2008 at 09:04 UTC |