in reply to strings extractor
You can simplify that a bit. Regexes operate on $_ by default, and when you assign the results to @_, it will overwrite anything that is there, so there is no need to initialise it. You can also combine the statements into 1
Updated code with corrections by animator
perl -ne '@_=/(\w{3,})/g and print"$.:@_$/"' test.jpg
That said, linenumbers don't make much sense in a binary file, and if you supply multiple files or a wildcard, the linenumbers will not reset to 1 for each new file.
|
|---|