I am creating ".inf" file using following command using perl program.
system("secedit /export /areas USER_RIGHTS /cfg ".$path);
Next, I want to open this file and search for a string. But while opening this file it is not opening in standard format rather some other format,between each letter space is coming, so it was not able to search that string.
I need to encode this file to utf-8.
How to do this???
What I have tried:
I tried this code to encode my file, but it is not working,
my $hdlFile = open(my $fh, "<:encoding(UTF-8)", $strFilePath)
|| die "Can't open UTF-8 encoded $strFilePath: $!";