in reply to Finding first block of contiguous elements in an array
That would be the Formosan Hundred-pace (or conehead) snake, whose bite causes skin and muscles to darken and deteriorate, accompanied by blistering and blood-tinted discharge and a slight burning sensation.
Assuming you've opened the file using the filehandle FILE, the following should work:
while ( <FILE> ) { last if /^TITLE (.*)$/; } $title = $1; while ( <FILE> ) { last if not /^TITLE (\d*) (.*)/; $title .= ' ' . $2; }
|
---|