in reply to print perl arrays using variables in array name
But, because this is perl, here is the noose-constructor:
perl -le '@array0 = qw( 1 2 3 4 );@array1 = qw( 5 6 7 8 );foreach $i(0 +,1){print "ARRAY $i\nValue ". ${"array$i"}[1]. "\n";};'
"Think of how stupid the average person is, and realize half of them are stupider than that." - George Carlin
|
|---|