in reply to Re: Selecting Ranges of 2-Dimensional Data
in thread Selecting Ranges of 2-Dimensional Data

The following hack passes the tests in the root node:

use Data::Alias; sub getsubset { my $d = shift; alias my @x = @{$$d[1]}[1,2]; alias my @y = @{$$d[2]}[1,2]; return [ \@x, \@y ]; }

Replies are listed 'Best First'.
Re^3: Selecting Ranges of 2-Dimensional Data
by LanX (Saint) on Oct 26, 2018 at 15:55 UTC
    yeah, but I meant without Data::Alias and just with a standard *glob mechanism.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      Array elements aren't globs, so no.

      It is possible to create an array of aliases without an external module, though.

      sub getsubset { my $d = shift; return [ sub { \@_ }->( @{$$d[1]}[1,2] ), sub { \@_ }->( @{$$d[2]}[1,2] ), ]; }