Perl tutorials, labs & MCQs.
Perl for VLSI engineers, in two parts. Part I is a complete Perl education that stands on its own — running your first script, scalars and sigils, context, operators, strings and quoting, arrays, hashes, references and nested data structures, conditions, loops, subroutines, regular expressions in depth, packages and modules, file handling, errors and debugging, and command-line Perl — with no semiconductor knowledge assumed. Part II applies it and never re-teaches it: engineering file trees, simulation and UVM log parsing, RTL filelist generation, netlist processing, synthesis and STA report parsing, coverage and regression reporting, regression automation, integration with Bash, Tcl and EDA tools, testing and maintaining automation, the Perl → Python migration path, and end-to-end automation projects.

Tutorials
Learn Perl from beginner to advanced through structured tutorials.
Labs
Practice Perl using progressively challenging hands-on labs.
MCQs
No MCQ papers for Perl yet.
What Perl is
Perl is a dynamic language built for handling text, with pattern matching written directly into its syntax rather than bolted on through a library. Its data model is deliberately small — scalars, arrays and hashes, marked by the sigils $, @ and % — and its defining property is context: the same expression yields one value or many depending on where it is used, and a value carries no fixed type, behaving as a number or a string according to the operator applied to it. In semiconductor engineering Perl matters less as a language you choose today and more as one already running: filelist generators, log scrapers, report parsers and flow glue written over decades still execute nightly in production flows, and somebody has to read, debug and safely change them. This track currently covers the language core — execution model, scalars and context, operators, strings, arrays, hashes and references — which is the part you need before any of that older code becomes legible.
Why it exists
Perl's strength and its reputation come from the same decision: it optimises for the common case in text work and makes that case very short to write. Splitting a line into fields, counting occurrences by key, building a nested structure as you go — each is a line or two, with no boilerplate between the intent and the result. That is why so much EDA infrastructure was written in it, and why so much of that infrastructure is still there. The engineering consequence today is practical rather than nostalgic. A working flow script that has run correctly for ten years carries knowledge that is not written down anywhere else, and rewriting it in another language is a migration project with its own defect budget, not an improvement by default. Being able to read Perl, reason about what a dense line actually does, and change it without altering behaviour is a more valuable and more common skill than being able to start a new Perl project.
The part engineers get wrong
Perl's concision comes from deciding things on your behalf, and those decisions are context-sensitive and silent. The same array yields its elements in one place and its length in another. A value has no type, so the operator picks: `==` compares numerically and `eq` compares as text, which means two non-numeric strings compared with `==` both convert to zero and the test reports that they are equal. Truth has its own rules, so the string `"0"` is false while `"0.0"` is true. A list placed inside a list flattens into it and stops being a nested thing. Reading a key several levels down a structure creates every level above it as a side effect of looking. None of these produces an error, and each is concise enough that the wrong version reads as naturally as the right one — which is precisely why reviewing Perl means asking, of every line, what context the expression is in and whether a numeric or a string operation was intended. Perl will not raise the question itself; `use strict` and `use warnings` raise as much of it as the language can.
Before you start
- Comfort running a command in a terminal and editing a text file
- No prior Perl is assumed, and no programming background is required for the opening module
- Useful context rather than a requirement: an existing Perl script from your own flow to read alongside the material
What you will be able to do
- Run a script with `use strict` and `use warnings` enabled, and interpret what each one refuses
- Check a script for syntax without executing it, and find an answer in the documentation that ships with Perl
- Explain what each sigil selects, and why an element of `@list` is written with a `$`
- Predict whether an expression is in scalar or list context, and force the context you meant
- Choose between `==` and `eq` correctly, and describe what the wrong choice does to engineering text
- State exactly what Perl treats as false, including the strings that catch people out
- Turn a line of tool output into fields and rejoin it, knowing what `split` does with empty trailing fields
- Choose an array or a hash from the question being asked, and count occurrences by key
- Explain why hash iteration order changes between runs, and sort when order must be stable
- Build and walk nested data with references, and name what a reference points to
- Recognise autovivification, and judge when it is convenient and when it is a silent bug
- Copy a nested structure and say precisely what the copy shares with the original
The learning path
- Running Perl, and making it strictWhat Perl is and was built for; finding the interpreter; your first script and the shebang; how Perl executes a program; `use strict` and `use warnings`; reading errors; checking syntax without running; perldoc
- Scalars, context and conversionThe three sigils; scalars and lexical scope; numbers and strings as one type; undef and definedness; what counts as false; scalar versus list context and how to force either; the special variables worth knowing
- Operators and stringsArithmetic, string and assignment operators; numeric versus string comparison; the three-way comparators; precedence; quoting and interpolation; split and join; sprintf; chomp; comparing and sorting strings
- Arrays, hashes and referencesArrays, slices and stack operations; lists versus arrays; grep and map; hashes, keys and iteration order; choosing between an array and a hash; references, anonymous structures, nested data, autovivification, code references and deep copies
Core concepts
New to Perl? Work through the curriculum in order — each lesson assumes the one before it, and the sequence is what turns the roadmap above into working knowledge.
Already working with it? Use the core-concept links above to jump straight to the topic you need; each one opens the lesson that covers it in most depth.
Where this leads
Standards: perldoc and the Perl core documentation (perl.org) — Perl has no ISO or IEEE standard: the reference implementation and the documentation shipped with it define the language. That is why this track states behaviour verified against an interpreter and names the version when a claim depends on it, rather than citing a specification clause
