#!/usr/bin/perl -w use strict; use diagnostics; use Data::Dumper; my $config="/var/www/cgi-bin/prt.cfg"; open (CFGFILE,$config) || die "unable to open $config: $!\n"; my (@server,@arrayref); foreach $_() { chomp; next unless /^\w/; @server=split(/,/,$_); push (@arrayref, [ @server ]); } print "servers: $arrayref[0][2]";