in reply to A C-like brain in a Perl-like world

Another thing: you have
} else { break; }
in merge. I think you want last. break does not exist. Try using strict and either warnings (later perls) or the -w flag (earlier perls). I think the split is at 5.6.0. Correct me if I'm wrong about that.