foreach( @config ) { if( $_ =~ m|index_file =| and $_ !~ m/\#/ ){ $index_file =~ s/index_file = \"//; $index_file =~ s/\"\;$//; print "FILE: $index_file \n"; last; } }