Replace split($RS) with split, as $RS is the default.