in reply to Code Reviews -- List Identifiers

Something simple like this could be a start (with filenames given on the command line):

use strict; use warnings; my %identifiers; undef $/; undef @identifiers{ /((?:sub\s+|[\$@%])[a-zA-Z_][a-zA-Z_0-9]*)/g } whi +le <>; print join "\n", keys %identifiers;

but there are more things to find, like module names etc.