Hi,
I am trying to extract the includes from all the perl programs in my application space;ie. i want the list of all used modules in my application.
First i did a grep like 'grep -r "^use.*;$" * > ~dileepp/search.txt' which gives me the output in the form "filename:line containing use"
eg: test.txt:use DBI;
Then i used the awk program just to fetch the use part alone like:
'awk -F":" '{print $2}' search.txt | sort | uniq'.
This is giving me what i required, but fails at some points like this
test.txt:use Data:
umper
I want the entire use part 'use Data:
umper' not only 'use Data' .How can i make my command to include this condition also?
With Regards
Dileep Pattayath