in reply to Problem with matching multiple lines

Hai, I think this could help you,
while (<DATA>){ if($_ =~ m/KB([0-9]+)/) { push(@temp, $_); } } print "@temp\n"; __DATA__ "Information","17","4/13/2006 12:54:25 PM","Windows Update Agent","ISA +","Installation","N/A","Installation Ready: The following updates are + downloaded and ready for installation. To install the updates, an ad +ministrator should log on to this computer and Windows will prompt wi +th further instructions: - Security Update for Windows Server 2003 (KB911562) - Windows Malicious Software Removal Tool - April 2006 (KB890830) - Cumulative Security Update for Internet Explorer for Windows Server +2003 (KB912812) - Security Update for Windows Server 2003 (KB908531) - Cumulative Security Update for Outlook Express for Windows Server 20 +03 (KB911567)" "Information","17","4/13/2006 12:54:19 PM","Windows Update Agent","ISA +","Installation","N/A","Installation Ready: The following updates are + downloaded and ready for installation. To install the updates, an ad +ministrator should log on to this computer and Windows will prompt wi +th further instructions: - Security Update for Windows Server 2003 (KB911562) - Windows Malicious Software Removal Tool - April 2006 (KB890830) - Cumulative Security Update for Internet Explorer for Windows Server +2003 (KB912812) - Security Update for Windows Server 2003 (KB908531)"

Regards
perlsen

Replies are listed 'Best First'.
Re^2: Problem with matching multiple lines
by jeiku (Acolyte) on Apr 19, 2006 at 08:53 UTC
    Hi, I found this:

    http://rath.ca/Misc/Perl_CSV/index.shtml
    http://rath.ca/Misc/Perl_CSV/multiline-csv.tgz

    Which does exactly what I need... Thanks anyway :)