I'm reading the contents of a file line by line. Each line is field separated with | characters. The file is coming from Nessus, if it matters.
The odd thing is that some of the time I'm getting part of the input line printed at a random position as shown below. My gut feeling is this only occurs for long lines but I'm not sure yet. I'm running Perl version 5.8.8. Please assist.
while( $raw = readline(PIPEIN) )
print Dumper( @todo );
$VAR1 = 'results';
$VAR2 = '100.100.100.100';
$VAR3 = '100.100.100.30';
$VAR4 = 'snmp (161/udp)';
$VAR5 = '35296';
$VAR6 = 'Security Note';
t use it, or\\nfilter incoming UDP packets going to this port.\\n\\nRisk factor :\\n\\nNone\\n\\nPlugin output :\\n\\nNessus has negotiated SNMP communications at SNMPv2c.\\n\\n';
Sample line of input
results|100.100.100|100.100.100.30|snmp (161/udp)|35296|Security Note|\nSynopsis :\n\nThis plugin reports the protocol version negotiated with the remote\nSNMP agent.\n\nDescription :\n\nBy sending an SNMP 'get-next-request', it is possible to determine the\nprotocol version of the remote SNMP agent.\n\nSee also :\n\nhttp://en.wikipedia.org/wiki/Simple_Network_Management_Protocol\n\nSolution :\n\nDisable the SNMP service on the remote host if you do not use it, or\nfilter incoming UDP packets going to this port.\n\nRisk factor :\n\nNone\n\nPlugin output :\n\nNessus has negotiated SNMP communications at SNMPv2c.\n\n