in reply to how to alias a subset of an array
output:#!/usr/bin/perl use strict; use warnings; use Data::Alias; use Data::Dump qw[dd]; my @A = (1,2,3,4,5,7,21,55,66); dd @A; alias my @B = @A[2..4]; dd @B; $B[0] = 0; dd @B; dd @A;
+% ~/test/alias.pl (1, 2, 3, 4, 5, 7, 21, 55, 66) (3, 4, 5) (0, 4, 5) (1, 2, 0, 4, 5, 7, 21, 55, 66)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to alias a subset of an array
by ww (Archbishop) on Oct 26, 2010 at 00:41 UTC | |
by Anonymous Monk on Oct 27, 2010 at 06:36 UTC |