Skip to content

Instantly share code, notes, and snippets.

@ohnomalone
Last active January 13, 2020 16:13
Show Gist options
  • Save ohnomalone/6ae80356a57e906dce9eed9eb1e0b07f to your computer and use it in GitHub Desktop.
Save ohnomalone/6ae80356a57e906dce9eed9eb1e0b07f to your computer and use it in GitHub Desktop.

Perl

By Matthew Malone Perl is a high-level programming language created by Larry Wall in 1987. Coming from JavaScript, there are many similarities, and the transitioning is smooth until the need for modules arises. Modules are like packages and components for JS. They are similarly imported at the top of the file you want to use them in.

Thirty-three years old, I can see how Perl was a fantastic precursor to Javascript. If I didn't know any better, I would say that Perl is an early version of JavaScript. When creating new variables, there is no need to define what type of variable it is going to be, declare it, and put the string, integer, or boolean after it.

The syntax is the most significant difference, which changes if you're writing in strict (use strict;) or not at the top of the file. To access the arguments sent through a function, they are assigned to a variable inside the function itself, not set as parameters. Semicolons have to be at the end of every statement, Perl won't do all the things you want if you don't. Being able in JavaScript will give you a huge advantage using Perl, don't be afraid to use a programming language that runs on over 100 platforms with over 30 years of development.

sources: https://www.perl.org/about.html https://en.wikipedia.org/wiki/Perl https://www.perl.com https://exercism.io/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment