I just tried
split /' '/ and
split /"' '"/ (double quoted single quotes) with same result- an empty $val.
I also threw in
use warnings; and got
Use of uninitialized value $val in concatenation (.) or string at k:/Packages/Packages/MirrorFolder4.1/test.pl line 42.
$val is (I thought) declared here:
my ($key, $val)