You know, I should really start making a list of quick security fixes for people.
$ ack -al '(?<!#)\s*use.+CGI::Carp\s.*fatalsToBrowser' | wc -l
Or to make it even easier :)
$ vim $(ack -al '(?<!#)\s*use.+CGI::Carp\s.*fatalsToBrowser' | wc -l)
You could also do that with perl -pi.bak, but I don't care to automate fixing security issues. You want to look at those directly The above, for example, won't recognize POD. Of course, it also won't recognize CGI::Carp->import('fatalsToBrowser').
$ vim $(ack -al '(?<!#)\s*use.+CGI::Carp\s.*fatalsToBrowser' | wc -l)
That makes Vim edit an empty file whose name, if later saved, will be a count how many files use fatalsToBrowser
. (OK, it might not be empty if you happen to have a weird filenaming convention in your current directory — but either way I don't think it's what you meant to suggest.)
Re:Line Count?
Ovid on 2007-09-07T10:56:32
Oops. Nice catch
:) I'll fix that.