# at the command prompt, assuming we're already in the top-level directory # containing all the perl source files... Be advised: this won't work until # you remove all the comments grep -rhP '\buse\b' * | \ # find "use"-like statements perl -E 'say $_ =~ /\buse\s+([\w:]+)/ for <>;' | \ # find the modules being used sort | \ # weed out... uniq | \ # ...any duplicates while read packname; # and start looping through the results do perldoc -l $packname 2>&-; # ask perldoc where source file is, ignore errors done | \ grep -v '.pod$' | \ # exclude pod files from the results; they are not modules while read packfile; # and loop through the results of the source file lookups do echo -n $packfile ' -> '; # here the real output begins. Show the filename: grep -P '\$([\w:]){0,}VERSION\b\s+=\s{0,}[[:punct:]]{0,1}\d' $packfile; # then ^^above^^ try your best to parse out the version number of the module # which will then get sent to the terminal done