Hey folks, long time no see..
I have a list of lists (or array or arrays if you rather ;-)) and am constantly adding stuff to it. However, I don't want to add duplicates. Therefore I want a quick and easy way of searching all the entries in the matrix for the string I am about to add.
The script will eventually check through a C header, grab all the
statements, add them to a to-do list. Once a C header is parsed, the ToDo list is consulted for the next header file to scan through. In theory then at the end of the process all nested includes from the original header file should have been processed...
So if
contains a list of header files (a.h, b.h, c.h...) and the
contains lists of files to check through in the future. I want to ensure that the push I do onto ToDoList does not already occur in the ToDoList (not necessarily at this level - but anywhere in the matrix).
Cheers
Loon
I have a list of lists (or array or arrays if you rather ;-)) and am constantly adding stuff to it. However, I don't want to add duplicates. Therefore I want a quick and easy way of searching all the entries in the matrix for the string I am about to add.
The script will eventually check through a C header, grab all the
Code:
#include
So if
Code:
@list
Code:
@{$ToDoList[$curr_lvl]}
Code:
foreach $item (@list)
{
print "\tAdding $item\n";
push @{$ToDoList[($curr_lvl + 1)]}, $f;
}
Cheers
Loon