You can turn a node list into a Perl array by just dereferencing it as an array:
#!/usr/bin/perl
use warnings;
use strict;
use feature qw{ say };
use XML::DOM;
my $parser = 'XML::DOM::Parser'->new;
my $doc = $parser->parsefile(shift) or die $!;
my $config = $doc->getElementsByTagName('config');
my $config_attr = $config->[0]->getAttribute('logdir');
say $config_attr;
Update: code simplified.
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord
}map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,