in reply to Re: Re: Re: Matching over multiple lines in a scalar
in thread Matching over multiple lines in a scalar
after a tactful /msg from chromatic, i can confirm that this works too, provided the data are very tidy indeed.
(i wish someone would redefine data as the mass noun it surely is, then I could stop pedantically pluralising around it.)
my (undef, %lines) = split(/(\d+): /, join('', <DATA>));
ugly, fragile and unwise, but you know, short.
|
|---|