split
действительно достаточно, просто дайте ему правильный шаблон.
use DDS; Dump split /hostname = .*\n/, 'some data
some data 1
some data 1
hostname = abc
some data
some data 1
some data 1
some data
some data 1
some data 1
hostname = xyz
some data
some data 1
some data 1
some data
some data 1
some data 1
hostname = pqr
some data
some data 1
some data 1
some data
some data 1
some data 1';
выход
$VAR1 = "some data\nsome data 1\nsome data 1\n";
$VAR2 = "some data\nsome data 1\nsome data 1\nsome data\nsome data 1\nsome data 1\n";
$VAR3 = "some data\nsome data 1\nsome data 1\nsome data\nsome data 1\nsome data 1\n";
$VAR4 = "some data\nsome data 1\nsome data 1\nsome data\nsome data 1\nsome data 1";