pzj20012 has asked for the wisdom of the Perl Monks concerning the following question:
Is there anyway to pass the 'string' in $testing as the array name to call out the array?#!/usr/bin/perl use strict; use warnings; use List::Util qw(min max); my @HD = (0.153488905, 0.153488905, 3.688879454); my $testing = "HD"; print @($testing); #this does not work.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing a string to call an array?
by GrandFather (Saint) on Oct 20, 2013 at 06:07 UTC | |
by pzj20012 (Initiate) on Oct 20, 2013 at 08:16 UTC | |
|
Re: Passing a string to call an array?
by Athanasius (Archbishop) on Oct 20, 2013 at 06:15 UTC | |
|
Re: Passing a string to call an array?
by Laurent_R (Canon) on Oct 20, 2013 at 08:44 UTC | |
|
Re: Passing a string to call an array?
by AnomalousMonk (Archbishop) on Oct 20, 2013 at 15:12 UTC | |
by Laurent_R (Canon) on Oct 20, 2013 at 20:35 UTC |