in reply to
printing the length of string variables
The main problem is that
print "$head Length=$len\n";
is being executed for every line in the file. It needs to be conditional. prasadbabu showed how.
Comment on
Re: printing the length of string variables
Download
Code
In Section
Seekers of Perl Wisdom