To run Perl programs on the command line, the first option you need is the switch -e which ensures code to be executed by the compiler (yes, this switch will always be specified for every perl one liner).
For example, to print "Hello World" at the terminal, just type the following at the command line:
$ perl -e 'print(\"Hello World\");'
Notice that the parentheses and semicolon can be left out. But I do not recommend it.