"I am looking at doing and getting better with oneliners from the command line."
If that's the case, I would highly recommend adding -wMstrict to your one-liners, right after the perl command, like so: perl -wMstrict -insert_other_stuff_here.
It does appear through other responses that you're a beginner really trying to learn, so throwing the switches I've recommended into the mix while you're learning will provide you the benefit of learning both one liners, and the work involved in making full-blown Perl scripts and modules reliable and as trustworthy as possible. You want your code to operate flawlessly under use warnings (an expanded -w) and use strict (-Mstrict). Very few Perl coders trust code without these present.
I know that using one-liners are typically for one-off type things, but for a relative newcomer to the language, a few extra keystrokes across one-liners will get you into the proper mindset so when you want to use them for more advanced things, you'll be able to do so on the fly quickly, and reliably.