Hi,I am trying to find if some files are present in an array using the below code,am using grep which is not giving an exact match.Ideally below the grep should fail.Can anyone advise how can I do that?
#!/usr/bin/perl -w use strict; use warnings; my @headers = ("fstring.h"); my $header_file ="string.h"; my @header_present; @header_present = grep( (/\Q$header_file\E/i), @headers); if (@header_present) { print "Header present\n";#should not print }
In reply to How to get an exact match of files by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |