Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to get an exact match of $file with $data.I am using the below if condition,but that doesnt seem to match and it matches other data aswell?How to get an exact match?I only want to match "adi"
$data="Adi";
$file="$(ROOT)/../../../../../../../Audio_Driver/adie_lib/$(CPU)/adi"
How to get an exact match of $dataif ($file =~ /^\/\Q$data\E$/i) { }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to get an exact match of files
by merlyn (Sage) on Mar 24, 2011 at 05:18 UTC | |
by Anonymous Monk on Mar 24, 2011 at 05:27 UTC | |
Re: How to get an exact match of files
by Nikhil Jain (Monk) on Mar 24, 2011 at 05:42 UTC |