in reply to Re^2: dynamically generated array variable
in thread dynamically generated array variable
Yes. I already provided that. use strict does not give an error with the code in my previous post.
use strict; use warnings; # ... Load config file ... my $hostname = 'hosta'; my @host = do { no strict 'refs'; @$hostname }; foreach my $cnf (@host) { ... }
By the way, why are you using qw(...) to initialize a scalar. Don't you want
$host = q(...);
or the equivalent but more readable
$host = '...';
In Section
Seekers of Perl Wisdom