in reply to Another question about the split function

why not just try a  $_ =~ s/^\s//gm as a pre-process step?