Perl Hashes

Variables whose names begin with % are hashes, which are essentially arrays subscripted by strings. As with arrays, %sue is a hash, and it is a different variable from $sue, though members of %sue are selected by $sue{$s}.

Continue reading

Hello World in Perl

This is how you would display “Hello World” in Perl. It’s quite similar to Bash, but note the differences carefully!

Create a text file called hello_world.pl containing the following code:

Navigate to a directory where your hello_world.pl is located and make the file executable:
Now you are ready to execute your first perl script: