- or download this
$singleton->{xml_filename} = $_[0];
$singleton->{hostlist} = \@hostlist;
- or download this
Dancer->new; # invocant is "Dancer"
$obj->dance; # invocant is $obj
- or download this
my @components = @{ $config->{host}->{component} };
foreach (@components)
{
push @hostList, $_->{component_name};
}
- or download this
push @hostList,
map { $_->{component_name} }
@{ $config->{host}->{component} };
- or download this
{
package MyConfig;
...
my @hostlist = @{ $config->hostlist };
print "@hostlist";