Hi All,

I have a folder/directory where I have all my Oracle sql scripts, useful for development & db administration. Every script contains comments, documentation in the top 5 lines or so. Sometimes the comments start with /* and end with */ and sometimes the initial lines start with -- which means comments/remarks in Oracle.

Now I want to write a perl/php script that will read all the files one-by-one from directory and pick the comments and write into a separate file so that I know what each script file does, without actually opening the script.

Its like I want to create a single file which contains contents/index for all the script files. Can somebody help me writing this script ?

Thanks in advance !