in reply to Value into array
I don't fully understand exactly what you need, but here is an additional way to Marshall's to do what you may want:
See the map built-in and the core (i.e., supplied with all standard Perl releases) module Data::Dumper.c:\@Work\Perl\monks>perl -le "use warnings; use strict; ;; use Data::Dumper; ;; my @ra = (100, 200, 300, 400); print Dumper \@ra; ;; @ra = map { [ $_+1, $_-1 ] } @ra; print Dumper \@ra; " $VAR1 = [ 100, 200, 300, 400 ]; $VAR1 = [ [ 101, 99 ], [ 201, 199 ], [ 301, 299 ], [ 401, 399 ] ];
Give a man a fish: <%-{-{-{-<
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Value into array
by ameezys (Acolyte) on Apr 08, 2019 at 07:29 UTC | |
by hdb (Monsignor) on Apr 08, 2019 at 07:42 UTC | |
by ameezys (Acolyte) on Apr 08, 2019 at 07:53 UTC | |
by hdb (Monsignor) on Apr 08, 2019 at 08:30 UTC | |
by Marshall (Canon) on Apr 08, 2019 at 07:57 UTC | |
by ameezys (Acolyte) on Apr 08, 2019 at 08:38 UTC | |
| |
by thanos1983 (Parson) on Apr 08, 2019 at 08:04 UTC |