I'm trying to run my basic Perl script from the file. It has something to do with the syntax, I can't figure it out what it is. This is the command:
$ perl -e 'print "Hello World\n";'
This works fine and outputs, Hello World on the next line. However, when I insert this into a vi and save it as the perlOne, the same and run the command:
$ perl perlOne
I get the error:
"syntax error at perlOne line 1, near "perl -e -- Execution of perlOne aborted due to compilation errors."
It's this same line, but it does not work in my file.
Help me.