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
In reply to Re: Joining multiple lines together while parsing
by Anonymous Monk
in thread Joining multiple lines together while parsing
by Arengin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |