SlideShare a Scribd company logo
1 of 116
Download to read offline
Perl Seminar
Perl Seminar
Perl Seminar
   by
What is Perl?
What is Perl?
What is Perl?
How to program it?
How to program it?


  Just type “perl”
How to program it?
How to program it?
How to program it?


       or
How to program it?
How to program it?
How to program it?



  Make “.pl” file
How to program it?
How to program it?
How to program it?


       or
How to program it?
How to program it?
How to program it?



#!/usr/bin/env perl
How to program it?
How to program it?
How to program it?


       AND
How to program it?
How to program it?
How to program it?


      Run !
How to program it?
Hell o World!
Hello, World!
Hello, World!
Hello, World!


print “Hello, World!”;
Hello, World!
Basic 1 : Variable
Basic 1-1 : Normal Variable
Basic 1-1 : Normal Variable
Basic 1-1 : Normal Variable


           : $VariableName
Basic 1-1 : Normal Variable


              : $VariableName
         or       or
Basic 1-1 : Normal Variable
Basic 1 : Variable
Basic 1-2 : Array Variable
Basic 1-2 : Array Variable



         : @VariableName
Basic 1-2 : Array Variable



          : @VariableName
   $#VariableName :
Basic 1-2 : Array Variable



          : @VariableName
   $#VariableName :
  $VariableName[n] : n
Basic 1-2 : Array Variable
Basic 1 : Variable
Basic 1-3 : Hash Variable




         (        )
Basic 1-3 : Hash Variable


 (        ) : %VariableName
Basic 1-3 : Hash Variable


 (          ) : %VariableName
$VariableName{key} : key   value
Basic 1-3 : Hash Variable
Basic 1 : Variable
Basic 1-4 : Temp Variable
Basic 1-4 : Temp Variable


               : $_
Basic 1-4 : Temp Variable
Basic 2 : Operator
Basic 2-1 : Numeric Operator
Basic 2-1 : Numeric Operator




      +
Basic 2-1 : Numeric Operator




      + -
Basic 2-1 : Numeric Operator




      + - *
Basic 2-1 : Numeric Operator




      + - * /
Basic 2-1 : Numeric Operator




      + - * /
                            t Ba sic!
                   t is jus
                  I
Basic 2-1 : Numeric Operator




      + - * /
Basic 2-1 : Numeric Operator




  += -= *= /=
Basic 2-1 : Numeric Operator




  += -= *= /=
                              ad d =
                      Jus t
Basic 2-1 : Numeric Operator
Basic 2-1 : Numeric Operator
Basic 2-1 : Numeric Operator


      == != <
      > <= >=
Basic 2-1 : Numeric Operator
Basic 2 : Operator
Basic 2-2 : String Operator
Basic 2-2 : String Operator




        .
Basic 2-2 : String Operator

            J OIN




        .
Basic 2-2 : String Operator

            J OIN




        .           x
Basic 2-2 : String Operator

            J OIN




        .           x
                        REPEAT!
Basic 2-2 : String Operator
Basic 2-2 : String Operator
Basic 2-2 : String Operator

   eq ne lt
   gt le ge
Basic 2-2 : String Operator
Basic 3 : Loop
Basic 3-1 : For
Basic 3-1-1 : Normal For
Basic 3-1-1 : Normal For

    for(Init; Cond; Inc) {
      # Something Todo
    }
Basic 3-1-1 : Normal For
Basic 3-1 : For
Basic 3-1-2 : Foreach
Basic 3-1-2 : Foreach

  foreach(List) {
    # Something Todo
  }
Basic 3-1-2 : Foreach
Basic 3-1-2 : Foreach
Basic 3-1-2 : Foreach

  for(List) {
    # Something Todo
  }
Basic 3-1-2 : Foreach
Basic 3-1-2 : Foreach
Basic 3-1-2 : Foreach

  foreach $Value (List) {
    # Something Todo
  }
Basic 3-1-2 : Foreach
Basic 3-2 : While
Basic 3-2 : While

while(condition) {
  # something to do
}
Basic 4 : Subroutine
Basic 4-1 : Subroutine?
Basic 4 : Subroutine
Basic 4-2 : definition

       sub NAME {

       }
Basic 4 : Subroutine
Basic 4-3 : Usage


 NAME(ARG1, ARG2, ARG3);
Basic 5 : I/O
Basic 5-1 : File I/O
Basic 5-1 : File I/O


open(HANDLE, < or > or >>, FILENAME)
Basic 5-1 : File I/O


open(HANDLE, < or > or >>, FILENAME)
          Input: <HANDLE>;
Basic 5-1 : File I/O


open(HANDLE, < or > or >>, FILENAME)
          Input: <HANDLE>;
 Output: print DESTINATION SOURCE;
Basic 5-1 : File I/O


open(HANDLE, < or > or >>, FILENAME)
          Input: <HANDLE>;
 Output: print DESTINATION SOURCE;
           close HANDLE;
Basic 5 : I/O
Basic 5-2 : Console I/O
Basic 5-2 : Console I/O


     Input: <STDIN>;
Basic 5-2 : Console I/O


     Input: <STDIN>;
      Output: print;
Basic 5-2 : Console I/O


     Input: <STDIN>;
      Output: print;
    ReadMode 'noecho';
Basic 6 : ARGUMENTS
Basic 6 : ARGUMENTS
Basic 6 : ARGUMENTS


 @_
Basic 6 : ARGUMENTS


 @_    @ARGV
Basic 6 : ARGUMENTS


 @_    @ARGV   shift

More Related Content

What's hot

Php Calling Operators
Php Calling OperatorsPhp Calling Operators
Php Calling Operators
mussawir20
 
Programming For Designers V3
Programming For Designers V3Programming For Designers V3
Programming For Designers V3
sqoo
 
OSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP hatersOSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP haters
Lin Yo-An
 

What's hot (19)

Ramda lets write declarative js
Ramda   lets write declarative jsRamda   lets write declarative js
Ramda lets write declarative js
 
Let's build a parser!
Let's build a parser!Let's build a parser!
Let's build a parser!
 
Python Basic
Python BasicPython Basic
Python Basic
 
Ramda, a functional JavaScript library
Ramda, a functional JavaScript libraryRamda, a functional JavaScript library
Ramda, a functional JavaScript library
 
Php Calling Operators
Php Calling OperatorsPhp Calling Operators
Php Calling Operators
 
Programming For Designers V3
Programming For Designers V3Programming For Designers V3
Programming For Designers V3
 
Zend Certification Preparation Tutorial
Zend Certification Preparation TutorialZend Certification Preparation Tutorial
Zend Certification Preparation Tutorial
 
OSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP hatersOSDC.TW - Gutscript for PHP haters
OSDC.TW - Gutscript for PHP haters
 
Computer Science Homework Help
Computer Science Homework HelpComputer Science Homework Help
Computer Science Homework Help
 
Perl IO
Perl IOPerl IO
Perl IO
 
PHP function
PHP functionPHP function
PHP function
 
Iteration
IterationIteration
Iteration
 
gonzalo
gonzalogonzalo
gonzalo
 
ZCPE - PHP Conference 2015
ZCPE   - PHP Conference 2015ZCPE   - PHP Conference 2015
ZCPE - PHP Conference 2015
 
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a c...
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a c...TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a c...
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a c...
 
PHP7. Game Changer.
PHP7. Game Changer. PHP7. Game Changer.
PHP7. Game Changer.
 
Unix 1st sem lab programs a - VTU Karnataka
Unix 1st sem lab programs a - VTU KarnatakaUnix 1st sem lab programs a - VTU Karnataka
Unix 1st sem lab programs a - VTU Karnataka
 
Code Generation in PHP - PHPConf 2015
Code Generation in PHP - PHPConf 2015Code Generation in PHP - PHPConf 2015
Code Generation in PHP - PHPConf 2015
 
Python Homework Help
Python Homework HelpPython Homework Help
Python Homework Help
 

Viewers also liked (7)

2012 AFMS Stakeholder Report
2012 AFMS Stakeholder Report2012 AFMS Stakeholder Report
2012 AFMS Stakeholder Report
 
Perl세미나
Perl세미나Perl세미나
Perl세미나
 
AMSUS SMOG Nov 2011
AMSUS SMOG Nov 2011AMSUS SMOG Nov 2011
AMSUS SMOG Nov 2011
 
Tecnoparque 1
Tecnoparque 1Tecnoparque 1
Tecnoparque 1
 
Reproducibility distinguishes conscious from nonconscious
Reproducibility distinguishes conscious from nonconscious Reproducibility distinguishes conscious from nonconscious
Reproducibility distinguishes conscious from nonconscious
 
Toozla ITB Berlin 2011
Toozla ITB Berlin 2011 Toozla ITB Berlin 2011
Toozla ITB Berlin 2011
 
Offutt SG Call Nov 2011
Offutt SG Call Nov 2011Offutt SG Call Nov 2011
Offutt SG Call Nov 2011
 

Similar to Perl세미나

Writing Maintainable Perl
Writing Maintainable PerlWriting Maintainable Perl
Writing Maintainable Perl
tinypigdotcom
 
2014 database - course 2 - php
2014 database - course 2 - php2014 database - course 2 - php
2014 database - course 2 - php
Hung-yu Lin
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
Kang-min Liu
 
Unix shell scripting basics
Unix shell scripting basicsUnix shell scripting basics
Unix shell scripting basics
Abhay Sapru
 
Unix Shell Scripting Basics
Unix Shell Scripting BasicsUnix Shell Scripting Basics
Unix Shell Scripting Basics
Dr.Ravi
 
Perl.Hacks.On.Vim
Perl.Hacks.On.VimPerl.Hacks.On.Vim
Perl.Hacks.On.Vim
Lin Yo-An
 

Similar to Perl세미나 (20)

Writing Maintainable Perl
Writing Maintainable PerlWriting Maintainable Perl
Writing Maintainable Perl
 
2014 database - course 2 - php
2014 database - course 2 - php2014 database - course 2 - php
2014 database - course 2 - php
 
Functional Pe(a)rls version 2
Functional Pe(a)rls version 2Functional Pe(a)rls version 2
Functional Pe(a)rls version 2
 
Perl 5.10 for People Who Aren't Totally Insane
Perl 5.10 for People Who Aren't Totally InsanePerl 5.10 for People Who Aren't Totally Insane
Perl 5.10 for People Who Aren't Totally Insane
 
Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6
 
Programming in perl style
Programming in perl styleProgramming in perl style
Programming in perl style
 
Os Treat
Os TreatOs Treat
Os Treat
 
Basic PHP
Basic PHPBasic PHP
Basic PHP
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
 
Perl Tidy Perl Critic
Perl Tidy Perl CriticPerl Tidy Perl Critic
Perl Tidy Perl Critic
 
Unix shell scripting basics
Unix shell scripting basicsUnix shell scripting basics
Unix shell scripting basics
 
Unix Shell Scripting Basics
Unix Shell Scripting BasicsUnix Shell Scripting Basics
Unix Shell Scripting Basics
 
What's New in Perl? v5.10 - v5.16
What's New in Perl?  v5.10 - v5.16What's New in Perl?  v5.10 - v5.16
What's New in Perl? v5.10 - v5.16
 
Bioinformatica 29-09-2011-p1-introduction
Bioinformatica 29-09-2011-p1-introductionBioinformatica 29-09-2011-p1-introduction
Bioinformatica 29-09-2011-p1-introduction
 
Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007
 
Perl.Hacks.On.Vim
Perl.Hacks.On.VimPerl.Hacks.On.Vim
Perl.Hacks.On.Vim
 
Php Basic
Php BasicPhp Basic
Php Basic
 
Getting modern with logging via log4perl
Getting modern with logging via log4perlGetting modern with logging via log4perl
Getting modern with logging via log4perl
 
SPL, not a bridge too far
SPL, not a bridge too farSPL, not a bridge too far
SPL, not a bridge too far
 
The Ruby On Rails I18n Core Api
The Ruby On Rails I18n Core ApiThe Ruby On Rails I18n Core Api
The Ruby On Rails I18n Core Api
 

Recently uploaded

Recently uploaded (20)

Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matrices
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
The Ultimate Guide to Social Media Marketing in 2024.pdf
The Ultimate Guide to Social Media Marketing in 2024.pdfThe Ultimate Guide to Social Media Marketing in 2024.pdf
The Ultimate Guide to Social Media Marketing in 2024.pdf
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
Essential Safety precautions during monsoon season
Essential Safety precautions during monsoon seasonEssential Safety precautions during monsoon season
Essential Safety precautions during monsoon season
 
Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024
 
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
 
MichaelStarkes_UncutGemsProjectSummary.pdf
MichaelStarkes_UncutGemsProjectSummary.pdfMichaelStarkes_UncutGemsProjectSummary.pdf
MichaelStarkes_UncutGemsProjectSummary.pdf
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
 
philosophy and it's principles based on the life
philosophy and it's principles based on the lifephilosophy and it's principles based on the life
philosophy and it's principles based on the life
 
Morse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptxMorse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptx
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
Mbaye_Astou.Education Civica_Human Rights.pptx
Mbaye_Astou.Education Civica_Human Rights.pptxMbaye_Astou.Education Civica_Human Rights.pptx
Mbaye_Astou.Education Civica_Human Rights.pptx
 
Behavioral-sciences-dr-mowadat rana (1).pdf
Behavioral-sciences-dr-mowadat rana (1).pdfBehavioral-sciences-dr-mowadat rana (1).pdf
Behavioral-sciences-dr-mowadat rana (1).pdf
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
“O BEIJO” EM ARTE .
“O BEIJO” EM ARTE                       .“O BEIJO” EM ARTE                       .
“O BEIJO” EM ARTE .
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
 

Perl세미나