Perl Programming for Beginners: An Introduction to Learn Perl Programming with Tutorials and Hands-On Examples

1,393 240 9MB

English Pages [135] Year 2020

Report DMCA / Copyright

DOWNLOAD FILE

Perl Programming for Beginners: An Introduction to Learn Perl Programming with Tutorials and Hands-On Examples

Table of contents :
1. Introduction
2. Scope of Perl
How relevant is Perl in 2020 and beyond?
What are the prerequisites of learning Perl?
What will I learn from this book?
3. Getting Started
3.1 Installing Perl on Windows
3.2 Installing Perl on Unix-like systems
3.3 Perl Scripts/Programs
3.4 Script Execution
3.5 Hello World!!! Script Execution
4. Basic Syntax
4.1 Statements
4.2 Comments
4.3 Code Block
4.4 Identifiers
5. Writing your first Perl script
5.1 print Function
5.2 Syntax Errors
6. Data Types and Variables
6.1 Data Types
6.1.1 Scalar
6.1.2 Arrays
6.1.3 Hashes
6.2 Variables
6.2.1 Declaring Scalar Variables
6.2.2 Numeric Values
6.2.3 String Values
6.2.4 Display Scalar Variables
7. User Interaction
8. Operators
8.1 Arithmetic Operators
8.2 Assignment Operators
8.3 Comparison Operators
8.4 Logical Operators
8.5 Bitwise Operators
9. Decision Making
9.1 if-else Statements
9.2 unless Statement
10. Loops
10.1 while Loop
10.2 do-while Loop
10.3 until Loop
10.4 for Loop
10.5 Nested Loops
10.6 Control Statements
10.6.1 next Statement
10.6.2 last Statement
10.6.3 continue block
10.6.4 redo Statement
11. Arrays
11.1 Array Creation
11.2 Accessing Array Elements
11.3 Range Operator
11.4 Arrays and Loops
11.5 foreach Loop
11.6 Reading user input into arrays
11.7 Array Manipulation
11.8 Sorting Arrays
12. Hashes
12.1 Accessing and Manipulating Hashes
12.1.1 Check if a Key Exists
12.1.2 Delete Hash Elements
12.2 Fetch Keys and Values
13. Subroutines
13.1 Defining a Subroutine
13.2 Calling a Subroutine
13.3 Passing arguments
14. Strings
14.1 String Basics
14.2 String Concatenation and Repetition
14.3 Search within a string
15. File Handling
15.1 Basics of File I/O
15.1.1 Open Files
15.1.2 File Modes
15.1.3 Close Files
15.1.4 Create a simple file
15.1.5 Writing to a file
15.1.6 Reading from a file
15.1.7 Search text inside a file
16. Programming Examples
16.1 Prime or Composite
16.2 Fibonacci Series
16.3 Sum of digits of a number
16.4 Reverse a number
16.5 Menu driven program
16.6 Lowest Common Multiple
16.7 Search for an element in an array
16.8 Greatest element in an array
16.9 Bubble Sort
16.10 File Copy
17. Final Thoughts

Polecaj historie