in reply to Joining multiple lines together while parsing
my $data = do{ local $/; <DATA> }; my @parts = split( /(\w+:)/, $data ); shift @parts unless $parts[0] =~ /\w+:/; for (@parts) { s/^\s+//; s/\s+$//; s/\s+/ /g; } use Data::Dumper; print Dumper {@parts}; __DATA__ Warning bad news here Detail: Some really nice infos these are Info: This is a problem but there is a solution Spec: 2nd of 4
|
|---|