in reply to how to read & search in a binary file
After adding a few more path characters (':' and '\') the following works for me under Windows:
use strict; use warnings; open IN, '<', 'notepad.exe.lnk' or die $@; my $pathchrs = ''; while (<IN>) { my @strs = /([-\/\.[:alnum:]_\\:]{10,})/g; print join "\n", @strs; } close IN;
Prints:
notepad.exe C:\WINDOWS\notepad.exe
|
|---|