This script takes a directory as an argument and then submits every file in that directory to the W3C validator. It will print out a line for each file stating if it is valid or otherwise. For the invalid files it will also print out the errors returned by the validator.
To install WebService::Validator::HTML::W3C, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Validator::HTML::W3C
CPAN shell
perl -MCPAN -e shell install WebService::Validator::HTML::W3C
For more information on module installation, please visit the detailed CPAN module installation guide.