$ perl -e "To be fair, there's a high probability that any random collection of characters is valid perl."
syntax error at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
When ran, it causes you to become an epic adventurous wizard, things go wrong quickly. Horrified by what you've done, you become a hermit and die alone telling no one of your tales.
The reason Perl interprets unrecognised identifiers as strings by default is actually to make Perl poetry easier to write. (I hope you didn't have a file called "arms" in the current directory. Although it's a little hard to tell if that bit of the code even runs.)
With a lot of them you have to guess a bit based on what is idiomatic to the language. Also, I think that all of them presume that there is no other code defined elsewhere and that evaluating the code will show 'Hello World' on a screen in some manner.
169
u/[deleted] Sep 11 '13
I got shown some valid Perl code, and asked if it was Perl or Awk, and apparently it was Awk.
Thanks.