pmonk4ever has asked for the wisdom of the Perl Monks concerning the following question:
Then spit out the path, filename, and the source lines where used, as they are found, to the screen. I can use tee to display to CRT & log into a file if needed later.
The OS is SGI Unix, PERL 5.6.1
I have pulled together a couple of subs, one which will search a single file for the constants, the other to print the source line to the CRT.
I have looked thru the Q & A & the CPAN examples, but was unable to find anything like this. I will be happy to post the final solution for others learn from as well.
I thought this could all be written in Perl, but I just can't seem to get this script started. Can anyone help with an example of what I want?
Thanks in advance.
ki6jux
The examples for Find::File are a bit sparse, are there any other code snippets around?
I got the shell answer to work, but I'd still like to solution this in Perl, for the experience, as a test developer, I don't get to code as much as I'd like to!
ki6
UPDATE
Thank you my fellow Monks for your quick responses! I have reached a dual solution, one in 'C' Shell, and a very elegant one in Perl, which I shall post for fellow Monks to observe and learn ...
You have renewed my faith in my fellow man/woman! Thank you!
ki6jux
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Search thru directories of .c & .h files for @Constants
by GrandFather (Saint) on Sep 19, 2007 at 00:02 UTC | |
|
Re: Search thru directories of .c & .h files for @Constants
by dave_the_m (Monsignor) on Sep 18, 2007 at 23:17 UTC | |
by pmonk4ever (Friar) on Sep 19, 2007 at 01:06 UTC | |
by pmonk4ever (Friar) on Sep 19, 2007 at 00:52 UTC | |
by jdporter (Paladin) on Sep 19, 2007 at 01:06 UTC | |
|
Re: Search thru directories of .c & .h files for @Constants
by derby (Abbot) on Sep 19, 2007 at 12:26 UTC | |
|
Re: Search thru directories of .c & .h files for @Constants
by scorpio17 (Canon) on Sep 19, 2007 at 14:29 UTC | |
by pmonk4ever (Friar) on Sep 19, 2007 at 19:10 UTC |