pixxyman has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm trying to search a number of large files containing a list of functions for commands that might be used multiple times.
For example, If I want to find all the functions that issue the command 'ipconfig'.
So I want to search the function file for 'ipconfig' and when I find it go BACK up through the file to find the function that issues this command.
So search for string 'ipconfig' and when found find a previous line containing sub ...., then split this line to determine the function name.
I've plenty of options to search for a specified string. I'm stuck when it comes to working back to the name of the function.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: determine the name of a function that contains a specified string
by Ratazong (Monsignor) on Mar 30, 2012 at 11:23 UTC | |
Re: determine the name of a function that contains a specified string
by moritz (Cardinal) on Mar 30, 2012 at 11:33 UTC | |
Re: determine the name of a function that contains a specified string
by stevieb (Canon) on Mar 30, 2012 at 14:21 UTC | |
by pixxyman (Initiate) on Apr 03, 2012 at 10:03 UTC | |
Re: determine the name of a function that contains a specified string
by stevieb (Canon) on Mar 31, 2012 at 03:52 UTC |
Back to
Seekers of Perl Wisdom