Download presentation
Presentation is loading. Please wait.
Published byAnn Evans Modified over 9 years ago
1
Perl: Practical Extraction & Reporting Language RL Schwartz, Learning Perl, RL Schwartz & L Wall, Programming Perl, O’Reilly & Associates
2
Perl complied programming language standard (procedural) programming language features + –regular expressions, system calls, file manipulation, report generation, data base manipulation, process management perfomance comparable to (or better than) Unix utilities and C
3
Standard Language Features sequence selection –if, if..else, if..elseif + unless, unless..else iteration –while, for(init; test; inc) + foreach var (list) functions (similar to C) data –scalar, array (list) + associative arrays - records
4
Associative Arrays keys –any scalar random access –set-like –unordered operations –keys(), values(), each(), delete()
5
Regular Expressions and Transliteration all the usual regular expressions =~ - true if matched, false otherwise change of delimiter split() - substrings join() - join substrings with given delimiter substitution translation
6
Text Files and Directories file and directory manipulation file handling (file handlers) –open() –close() –read and write line by line –check file status stat() lstat() - information on links binary files & data bases
7
Report Generation Perl formats - report writing templates fields –numbers, strings, lines, paragraphs headers page lengths
8
Process Management system(“command”) –launch a shell command `command` –launch a shell command fork and exec() –(almost) as in Unix (and C - see later) die –suicide sending signals –(almost) as in Unix eg kill(2, p1, p2) trapping signals
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.