substr outside of string at parsefile.pl line 13, line 12. Use of uninitialized value $msgtype in string ne at parsefile.pl line 16, line 12.