Although you have use strict; at the top of your code, the line (@dirtemp) = split /:/,$fname can not be right. It is missing a semicolon at the end of the line and my off the front. There are other similar errors.
That aside, your problem is next if $_ !~ /^\Q$filepath\E/i; trys to match from the start of the line (the ^ in the regex). Instead use /\Q$filepath\E/i; for the regex.
In reply to Re: Problem with searching for an entry in a file
by GrandFather
in thread Problem with searching for an entry in a file
by nisha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |