Sunday, January 31, 2016

Perl Basics

1.Perl is an scripting language
2. Practical extraction and report language
3. Basically used for text and data manipulation
4. It is an interpreted language
5. Doesn't need a special compiler to turn the scripts into working code
6. Do "which perl" to know the location of perl interpreter.
7. "perl filename" can be used for running the perl script.
Alternatively make "#! /usr/bin/perl" as the first line of your perl script.
8. Mostly .pl extension is associated with perl.
9. Give executable permission to the file before running :
Chmod + x hello.pl
10. Three main types of variables
Scalar, array and hash
$scalar, @array, %hash

11.  A singular variable is scalar and a plural variable is an array
12. Length of the variable name is not limited.
13. Variable names are case sensitive
14. Variable need not to be pre declared
15. No special character can be a part of variable name
16. Hash and array are used to hold scalar values
17. Normal arrays are indexed by number, and associative arrays by string.
18. Scalar variable can hold a string and a number
19. By default variables are global, unless defined otherwise
20. Use my keyword to declare variable as local

Ethernet and more

Ethernet is a protocol under IEEE 802.33 standard User Datagram Protocol (UDP) UDP is a connectionless transport protocol. I...