1NiceSlice(3) User Contributed Perl Documentation NiceSlice(3)
2
3
4
6 PDL::Perldl2::Plugin::NiceSlice - enable PDL NiceSlice syntax
7
9 This plugin enables one to use the PDL::NiceSlice syntax in an instance
10 of "Devel::REPL" such as the new Perldl2 shell, "pdl2". Without the
11 plugin, array slicing looks like this:
12
13 pdl> use PDL;
14
15 pdl> $x = sequence(10);
16 $PDL1 = [0 1 2 3 4 5 6 7 8 9];
17
18 pdl> $x->slice("2:9:2");
19 $PDL1 = [2 4 6 8];
20
21 After the NiceSlice plugin has been loaded, you can use this:
22
23 pdl> $x(2:9:2)
24 $PDL1 = [2 4 6 8];
25
27 "PDL::NiceSlice" uses Perl source preprocessing. If you need 100% pure
28 Perl compatibility, use the slice method instead.
29
31 "PDL::NiceSlice", "Devel::REPL", "PDL::Perldl"
32
34 Chris Marshall, "<chm at cpan dot org>"
35
37 Copyright (C) 2010 by Christopher Marshall
38
39 This library is free software; you can redistribute it and/or modify it
40 under the same terms as Perl itself.
41
42
43
44perl v5.34.0 2022-02-28 NiceSlice(3)