in reply to Data not getting stored in an array

Fix your regex
find(sub { push @libs, "$_\n" if -f && /\.lib$|serport|serport_d/ && !$seen{$ +_}++; }, "$options{data}");

Replies are listed 'Best First'.
Re^2: Data not getting stored in an array
by Anonymous Monk on Apr 24, 2011 at 23:00 UTC

    Thanks Wind,I figured that out,what I am not able to figure out is ,how to fix the regex to store all .lib,.lib.1,.lib.2.....etc.Can you please help?

      By /\.lib(?:\.\d+)?$/ or more explicitly:
      find(sub { push @libs, "$_\n" if -f && /\.lib(?:\.\d+)?$|serport|serport_d/ & +& !$seen{$_}++; }, "$options{data}");