in reply to noob regexpression question

Although not a *compile* error, you should replace m/exe/ and m/dll/ with m/\.exe$/i and m/\.dll$/i.

By the way, the following is equivalent (minus the prints) to your code:

chomp(@exeDllLines); my @dllarray = grep { /\.(?:dll|exe)$/i } @exeDllLines;
or the more memory-efficient
chomp(@exeDllLines); my @dllarray; foreach (@exeDllLines) { push @dllarray, $_ if /\.(?:dll|exe)$/i; }

Update: Oops, not quite. I didn't see the square brackets around DLLs.