Visão Geral
Este curso fornece uma introdução intensiva ao Perl, com foco na rápida aquisição de competência no uso de sintaxes complexas do Perl em tipos de programas do mundo real. A apresentação é uma mistura integrada de atividades de palestras e workshops que introduzem e reforçam técnicas e abordagens. As atividades do workshop seguem o material da sala de aula e são projetadas para reforço de tópicos e prática. Todos os tópicos de programação são apoiados por workshops e mais de 130 exemplos completos de programas. Este curso é uma combinação de 3 dias PE1010 Introduction to Perl Scripting e 3 dias PE1020 Advanced Topics in Perl Programming.
Conteúdo Programatico
Create and execute Perl programs that use:
- Scalar variables and scalar literals consisting of numbers or strings
- List array literals and variables ("lists")
- Hash array literals and variables ("hashes")
- Operators for lists and hashes
Use the control structures if, unless, while, until, for, and foreach as well as:
- last
- next
- Labelled blocks
- redo
- Expression modifiers if, unless, while, until
- Conditional construct ?:
Use operators for numeric and string scalars
- ++ and --
- Numeric operators for comparison and arithmetic
- String operators for concatenation, comparison and repetition
- chop()
- chomp()
- system()
- Grave accents to assign the output of the system command
- gethostbyname()
- &&, ||, !
Use the operators for lists and hashes
- push
- pop
- shift
- unshift
- reverse
- sort for Ascending and Descending Character and Numeric Sorts
- chop
- chomp
- keys
- values
- each
- delete
- exists
- defined
Perform basic input and output operations
- STDIN in scalar and array context
- @ARGV and $ARGV
- $0
- print
- printf
- sprintf
- open and close files using filehandles, open, close, And die
- file tests
- Here documents
- Use regular expression ("regex") wildcards to locate strings containing described contents, and the substitute, split, and join operators
- Define and invoke subroutines, pass arguments, return a return value, and use @_ and local and my variables
- Perform file and directory management including globbing and use of hard and soft links via the operators chdir(), opendir(), closedir(), readdir(), unlink(), rename(), link(), symlink(), readlink(), mkdir(), rmdir(), chmod(), chown(), stat(), lstat()
- Work with Perl modules, including use of quoting with qw, q, And qq; use strict; packages; symbol tables and qualified names; @INC; @ISA; importing with use, use(List), and require; AUTOLOAD; how to work with the same sub name in multiple modules; and File::Basename.pm
- Work with object-oriented modules using the example of DBI.pm
- Describe and use the pragma integer and the declaration no
- Work with complex data structures via hard references, anonymous lists, and anonymous hashes to create, populate, and obtain data values from multi-dimensional lists and hashes
- Pass complex data structures to subroutines, and make use of them within subroutines
- Determine the structure of multi-dimensional arrays and hashes via ref( ), dumpvar.pl, and dumpValue( )
- Describe and use classes, objects, bless( ), class and instance data members and methods, constructors and destructors
- If time permits, the following topics will be covered briefly:
- String operators index(), rindex(), substr(), sort(), tr()
- Time operators time, utime(), localtime()
- %ENV
- Grave Accents To Capture Standard Output
- Filehandles For Processes