Duration | Requirements | Agenda
| Scheduled Classes... | |||||||||||||||||||||||||
Contact Esperan for more information or to request an on-site class. |
Testimonials
"An excellent way to get started programming in Perl"
Introduction
Perl is a general purpose scripting language with outstanding features for text, file and process manipulation. In the EDA world, these features make Perl extremely useful for applications such as:-
- Extracting specific data from a text file, e.g. tool reports, logs, code or netlists
- Translating or tweaking code formats between tools
- General handling of Unix processes, signals and timeouts
- Easy creation of GUIs
Overview
This completely new course provides a detailed introduction of Perl, covering all of its core features, showing its application in analyzing large quantities of textual data and offering expert tips on how to construct effective scripts. Conventional Perl classes tend to concentrate on web programming applications. This class has been specifically written to emphasize the Perl features which are of more interest to EDA engineers and CAD departments.
Objectives
- To provide an in-depth understanding of the essential concepts of Perl.
- To describe Perl features for text, file and process manipulation
- To promote best-practice guidelines for writing Perl programs, using pod documentation and reusable modules
- Understanding references in Perl
- Understanding Perl’s powerful input/output facilities fro reading and writing data
- Get a deep understanding of modules, Perl’s library system
Duration
3 days. We can also offer standard or customized versions of this course onsite or at the location of your choice.
Requirements
Some programming experience is very helpful. No prior knowledge of Perl is required.
Description
This course covers:
Perl Fundamentals
Describing the basic syntax and concepts of Perl. Constructing robust, reusable Perl modules using best-practice guidelines for coding, documentation and testing.
Data Processing
Understanding how to create, read, update and delete common Perl data structures (arrays, hashes, arrays-of-arrays, arrays-of-hashes etc). Using Regular Expression syntax to extract and edit specific data from such structures and from text files. Manipulating files and directories in Perl.
Power Perl
Creating and using modules. Exploring CPAN resources. Testing and debugging Perl.
Agenda
Day 1
- Perl Overview
- Strengths of Perl
- Compiler vs. Interpreter
- Perl 6
- Getting Help
- perldoc
- Perl Fundamentals
- Syntax,
- Data types
- Variables
- References
- Scalar Variables
- Arrays and Lists
- Creating, reading, updating and deleting
- Functions
- Operators
Day 2
- Hashes
- Creating, reading, updating and deleting
- Functions
- Pragmas and Modules
- Control
- Conditional execution – if/unless
- Loops – while/foreach
- Statement modifiers
- Subroutines
- Parameters
- Local variables
- Lexical vs. dynamic scope
- Return Values
- Package/Module Overview
- File IO
- File open and close
- Read, write and append
- Piping to/from programs
- stdout, stderr, stdin, argv
Day 3
- Regular Expressions (REs)
- Searching and substitution
- Meta-characters
- Replication and ranges
- Modifiers and comments
- RE functions
- Modules
- Using core modules
- CPAN and module management
- Manual module installation
- Creating modules
- Export, Begin and End
- Debugger
- Control
- Source viewing
- Inspecting data
- Interacting with the filesystem
- Files and directories
- File tests
- Globbing
- Tips trick and hacks
Lab Exercises
The labs sessions include:
- Text search, substitution and processing
- Creating and manipulating data structures
- Use of subroutines
- Module management and installation
- Recursive programming
- Testing and debugging complex code
