my @Ds ; while () { my @matches = /(-D\S*)/g and push @Ds,@matches ; }