print $data;; #some "random stuff" @include "some file" did you parse that? #more 'random' stuff @include 'another file' you sure? #and more random stuff @include yet\ another\ file positive? print for $data =~ m[\@include\s('[^']+'|"[^"]+"|.+?(?