in reply to Re^2: Parsing a config file
in thread Parsing a config file
you need to loop through the array holding the refs and de-ref the bits you want to print...
BTW you can also get rid of the intermediate array @servers by just throwing split straight into an anonymous arrayprint "$_->[0]\n" for @arrayrefs # or map may be your friend print "servers: ", (join ", ", map {$_->[0]} @arrayrefs), "\n";
push @arrayrefs, [split(/,/,$_)];
Cheers,
R.
|
|---|