You’re using a Macbook Pro, so that’s probably MacOS 10. Also, you admit you know little about U**X, which is pretty effectively what you’re dealing with on MacOS 10. I’m assuming you’re using “Terminal” for your command line interface, but there are other options that work mostly the same.
Just try this from the command line prompt (which should look something like "Johns-MacBook-Pro:Perl [Johnny L.A.]$ "):
perl -e “print "Hello, World!
";”
The “/usr/bin/perl” should be unnecessary because “/usr/bin/” should already be part of your standard executable search path.
The “-e” is necessary because it’s a signal to the perl interpreter that everything to come until a semicolon is a perl command to be executed.
The "" characters are necessary to “escape” each of the following (single) characters from interpretation by the shell (bash) and ensure they reach the perl interpreter uninterpreted (but with the "" characters stripped).
If you want to put the script into a file, use this text in that file:
#!/usr/bin/perl
print "Hello, World!
";
Of course, you then have to use chmod +x {filename} from the command line to allow the shell to execute the contents.
A warning about TextEdit, by the way. On my Mac, TextEdit does not allow one to save a file as actual text only! “Rich Text” is the default, but others are available, none of them pure 7-bit ASCII. That sucks, IMO, because no interpreter (perl, python, ruby, bash, etc.) is going to handle the encoding properly. If you don’t have time to learn “vi”, there are other editors available at the App Store.
“vi” comes native with MacOS, and it’s really not that difficult to learn. There are lots of tutorials for it online. I think this one is pretty good for a start: https://www.tutorialspoint.com/unix/unix-vi-editor.htm
Good luck!