http://qs1969.pair.com?node_id=1182208


in reply to Parse for a name after a keyword search in all the files, given directory as input

If your Verilog files are very simple, you don't even need Perl. You can just use grep:
grep -w module *.v

If your files are not so simple, then you should use a Verilog parser: Verilog-Perl. For example, if some of your modules are commented out, or if the module keyword is not on the same line as the module name, etc.