while ( $data =~ m{ \G ( .+? \. xml ) }gxms ) { print "$1\n"; }