in reply to Problem with searching for an entry in a file

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.


DWIM is Perl's answer to Gödel