in reply to Re^8: How to write to a file?
in thread How to count the length of a sequence of alphabets and number of occurence of a particular alphabet in the sequence?
Your input file seems to contain an empty line, but the script does not provide for it.
If empty lines are ok, you could define something likeand after the chompmy $rx_empty = qr{ \A \s* \z }xms; # empty line (or whitespace on +ly)
if ($record =~ $rx_empty) { # ignore next RECORD }
|
---|
In Section
Seekers of Perl Wisdom