in reply to Odd workings of split

Another work around, specially geared towards the oddity that split returns an empty list:
$cmd[$_] = [split("\n", $cmd[$_]), ""]->[0];