use warnings; added to the one-liner this is evident:

!=~ should be !~ at -e line 1. Use of uninitialized value $_ in pattern match (m//) at -e line 1. Argument "abc efg hijk lmnop" isn't numeric in numeric ne (!=) at -e line 1.