I’m looking for a way to determine the code to text ratio of a web page in Perl. Not looking for anything complex just a simple print out like HTML Code:75% Text:25% just for SEO Reasons.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Hmm… thinking quickly… How about:
You can then simply run the script on the file(s) in question:
NOTE: this will not work if your data contains any CDATA fields