Hum, yes,
GrandFather, you're right, I wouldn't write such code, but here I only wanted to point to the obvious error in the code shown, i.e. that the first split was useless (because the result is never used) and that the second split did not split anything but probably only removed trailing spaces and newline character from
$_. But you're right that the OP should use strictures and warnings, should not use the $a and $b special variables, should use meaningful variable names, and so on.