in reply to Help with a regex

I get the following:

use warnings; use strict; use Data::Dumper; chomp( my @array = <DATA> ); for (@array) { chomp; if (/^lib$/) { print "Yes: $_\n"; } else { print "No : $_\n"; } } print "\n", Dumper \@array; __DATA__ nfcclib lib

Output:

No : nfcclib Yes: lib $VAR1 = [ 'nfcclib', 'lib' ];

Consider using Data::Dumper to examine the array's elements.

Hope this helps

Edit: Added Data::Dumper.