Eu escreveria:
perl -MFile::Path=make_path -00 -ne '
($block) = /BLOCK NUMBER : (\d+)/;
@sizes = /SIZE : (\d+) (\d+)/;
$dir = sprintf "data/%d-size1/%d-size2", @sizes;
make_path $dir;
if (open $fh, ">", "$dir/$block-block.txt") {
print $fh $_;
close $fh;
}
' bigfile.txt