I would like to write Perl script to read just first line of a file & calculate the length of second field which is comma separator file.
For example -
1001,abcd,9999
1002,xyz,0001
expecting result - 4 (character length of second field from just first line i.e. abcd)
Can somebody help me to write perl script for this?