Skip to end of metadata
Go to start of metadata

Introduction

You DO not need to learn Perl to use NMIS, Perl is however a powerful, elegant and thoughtful language for solving real problems.  You can do low level things like C with the ease of scripts like BASH, and everything in between.  BUT the real power of Perl is CPAN, the Comprehensive Perl Archive Network, someone somewhere has probably already solved your problem and published something on CPAN.

Perl Online References

Some great web pages to learn about Perl

Please comment if you know some more good ones.

Perl Basics

Perl Data Types

  • Scalar -> $variable
  • Array -> @array
  • Associative Array (hash) -> %hash
  • Combinations to make complex types easily (looks confusing but very powerful)
  • Array of hashes $array[$i]->{$key}
  • Hash of hashes $hash{$key}{$var}
  • Multi-dimensional $var->{$key}->[0]->{$thing}

Use it!

Perl if statement

 

Perl Loops -> While

Perl Loops -> for

Perl Loops -> foreach

Open a file and loop through

 


  • No labels