I will simplify my code
open(my $in, '<:raw', $filename) || die "Couldn't openfile:$!";
my $text = do { local $/; <$in> };
close $in;
my $content = decode('UTF-16LE', $text);
#print $content;
if ($content =~ (m/$search_pattern/gi)) { print...
Hi all,
I have been given a task to search for strings in a file that is encoded. I need to display the file name only when all the 3 strings which i provide are present in the file name.
i first try to get a list of files according from the directory according to the value passed in argument...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.