Is it possible
It is possible but it is also unwise. Use a HoA instead:
#!/usr/bin/env perl use strict; use warnings; use Data::Dumper; my @array = qw/x y z/; my %HoA; foreach my $R2 (@array) { push @{$HoA{$R2}}, $R2 } print Dumper (\%HoA);
See perldsc for how to work with deep structures.
In reply to Re: Creating array name by susbtituting string
by hippo
in thread Creating array name by susbtituting string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |