in reply to Multidimentional array help

The following may get you started:

use strict; use warnings; my @dlr_loc = qw(A060 A061 A062 A063 A064); my @aoa = map {[$_, qw(US M10 WEDNESDAY SEASONAL)]} @dlr_loc; print "@$_\n" for @aoa;

Prints:

A060 US M10 WEDNESDAY SEASONAL A061 US M10 WEDNESDAY SEASONAL A062 US M10 WEDNESDAY SEASONAL A063 US M10 WEDNESDAY SEASONAL A064 US M10 WEDNESDAY SEASONAL

DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^2: Multidimentional array help
by sasrs99 (Acolyte) on May 29, 2007 at 22:48 UTC
    Thanks for the advice. One last thing, if I have a variable called $ordtype with a value = 'SEASONAL', how can I substitute this variable so I don't have to hard-code the string?
      ... my $ordtype = 'SEASONAL'; my @aoa = map {[$_, qw(US M10 WEDNESDAY), $ordtype]} @dlr_loc; ...

      DWIM is Perl's answer to Gödel