in reply to Re^2: Perl: Split/format the output and append it to an array
in thread Perl: Split/format the output and append it to an array

or even
@xlinkpaths = map /xlink (.+?)/, @xlinks;

you think you're getting undefs (but you're not in this case)? simply prepend  grep defined,  map ...