Introduction to PerlProgrammingMorris LawDecember 8,2012
Introduction to Perl Programming Morris Law December 8, 2012
ContentWhat is PERL?Installation and usage of PERL on WindowsPERL number and stringsScalar, array and hashOperatorsControl FlowRegular ExpressionSubroutineFileUse of Perl Package Manager
Content • What is PERL? • Installation and usage of PERL on Windows • PERL number and strings • Scalar, array and hash • Operators • Control Flow • Regular Expression • Subroutine • File • Use of Perl Package Manager
What is PERL?. Practical Extraction and Report Languagemore than 1 way to do it easy for human reading: highly portable talk text high level languagefreeprogram code with .plx and .pl as extension@MS Windows and UNIX respectively
What is PERL? • Practical Extraction and Report Language • more than 1 way to do it • easy for human reading • highly portable • talk text • high level language • free • program code with .plx and .pl as extension on MS Windows and UNIX respectively
What is PERL?: interpreter as well as compiler: support unicode: base 16 (hex). bundle with help:--perldoc -f print(info)(faq)-perldoc -q reverse-perldoc Text::Wrap
What is PERL? • interpreter as well as compiler • support unicode • base 16 (hex) • bundle with help:- – perldoc -f print (info) – perldoc -q reverse (faq) – perldoc Text::Wrap
PERL is free and portable: Most UNIX/Linux distribution comewith PERL installed· Mac OS X already has PERL installed: Windows does not come with PERL bydefault. Two choices- ActiveState PERL- Strawberry PERLaPest stable version is 5.16.2
PERL is free and portable • Most UNIX/Linux distribution come with PERL installed • Mac OS X already has PERL installed • Windows does not come with PERL by default. Two choices – ActiveState PERL – Strawberry PERL • Latest stable version is 5.16.2