in reply to hash of hashes
As others have stated, it is unclear what you want here. Your title and text seem to have no relationship to each other. Please read the guidelines in "How do I post a question effectively?" and follow them before posting again.
My best guess at what you're after:
#!/usr/bin/env perl -l use strict; use warnings; my @x = qw{X A B}; my $x = shift @x; my @y = map { [ $_ ] } @x; push @$_, $x for @y; print join ',' => map { "@$_" } @y;
Output:
A X,B X
-- Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: hash of hashes
by Laurent_R (Canon) on Oct 05, 2013 at 10:03 UTC |