SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Perl in the Command Line
-c: Test Compiling ,[object Object]
It will execute  BEGIN ,  UNITCHECK ,  CHECK , and  use  blocks, because these are considered as occurring outside the execution of your program.
It will not execute  INIT  and  END  blocks.
-w, -W and -X: Warnings ,[object Object]
-W:  Enables all warnings regardless of  no warnings  or  $^W .
-X:  Disables all warnings regardless of  use warnings  or  $^W .
$> perldoc perllexwarn
-d: Debugging ,[object Object]
-d:DProf : executes the program using the  Devel::DProf  profiler, combined with  dprofpp  may help you to find where is your program slow.
$> perldoc perldebtut $> perldoc perldebug
-e: eval ,[object Object]
-M: module Import ,[object Object]
$> perl –Mdiagnostics script.pl Get better error message.
perl -MLWP::Simple -e 'print get($ARGV[0]), "
"' http://perl.com Better as an alias.

Weitere ähnliche Inhalte

Was ist angesagt?

Design patterns as power of programing
Design patterns as power of programingDesign patterns as power of programing
Design patterns as power of programing
Lukas Lesniewski
 
Buffer overflow tutorial
Buffer overflow tutorialBuffer overflow tutorial
Buffer overflow tutorial
hughpearse
 

Was ist angesagt? (20)

New Stuff In Php 5.3
New Stuff In Php 5.3New Stuff In Php 5.3
New Stuff In Php 5.3
 
Compiladoresemulador
CompiladoresemuladorCompiladoresemulador
Compiladoresemulador
 
Design patterns as power of programing
Design patterns as power of programingDesign patterns as power of programing
Design patterns as power of programing
 
Bioinformatics p4-io v2013-wim_vancriekinge
Bioinformatics p4-io v2013-wim_vancriekingeBioinformatics p4-io v2013-wim_vancriekinge
Bioinformatics p4-io v2013-wim_vancriekinge
 
Perl Modules
Perl ModulesPerl Modules
Perl Modules
 
Python Programming Essentials - M27 - Logging module
Python Programming Essentials - M27 - Logging modulePython Programming Essentials - M27 - Logging module
Python Programming Essentials - M27 - Logging module
 
Looping statements
Looping statementsLooping statements
Looping statements
 
Python Programming Essentials - M35 - Iterators & Generators
Python Programming Essentials - M35 - Iterators & GeneratorsPython Programming Essentials - M35 - Iterators & Generators
Python Programming Essentials - M35 - Iterators & Generators
 
Closures
ClosuresClosures
Closures
 
Python Imports
Python ImportsPython Imports
Python Imports
 
Buffer overflow tutorial
Buffer overflow tutorialBuffer overflow tutorial
Buffer overflow tutorial
 
Gore: Go REPL
Gore: Go REPLGore: Go REPL
Gore: Go REPL
 
PHP 5.6 New and Deprecated Features
PHP 5.6  New and Deprecated FeaturesPHP 5.6  New and Deprecated Features
PHP 5.6 New and Deprecated Features
 
02 Php Vars Op Control Etc
02 Php Vars Op Control Etc02 Php Vars Op Control Etc
02 Php Vars Op Control Etc
 
Cell processor lab
Cell processor labCell processor lab
Cell processor lab
 
Bash Programming
Bash ProgrammingBash Programming
Bash Programming
 
LTP
LTPLTP
LTP
 
Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009Prepare for PHP Test Fest 2009
Prepare for PHP Test Fest 2009
 
Perl 20tips
Perl 20tipsPerl 20tips
Perl 20tips
 
Lesson 2 starting output
Lesson 2 starting outputLesson 2 starting output
Lesson 2 starting output
 

Ähnlich wie Perl In The Command Line

Shell Scripts
Shell ScriptsShell Scripts
Shell Scripts
Dr.Ravi
 
Php Reusing Code And Writing Functions
Php Reusing Code And Writing FunctionsPhp Reusing Code And Writing Functions
Php Reusing Code And Writing Functions
mussawir20
 

Ähnlich wie Perl In The Command Line (20)

Bioinformatica 29-09-2011-p1-introduction
Bioinformatica 29-09-2011-p1-introductionBioinformatica 29-09-2011-p1-introduction
Bioinformatica 29-09-2011-p1-introduction
 
Bioinformatica 27-10-2011-p4-files
Bioinformatica 27-10-2011-p4-filesBioinformatica 27-10-2011-p4-files
Bioinformatica 27-10-2011-p4-files
 
Os Treat
Os TreatOs Treat
Os Treat
 
Perl - laziness, impatience, hubris, and one liners
Perl - laziness, impatience, hubris, and one linersPerl - laziness, impatience, hubris, and one liners
Perl - laziness, impatience, hubris, and one liners
 
NYPHP March 2009 Presentation
NYPHP March 2009 PresentationNYPHP March 2009 Presentation
NYPHP March 2009 Presentation
 
Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007
 
May The Nodejs Be With You
May The Nodejs Be With YouMay The Nodejs Be With You
May The Nodejs Be With You
 
Makefiles Bioinfo
Makefiles BioinfoMakefiles Bioinfo
Makefiles Bioinfo
 
lec4.docx
lec4.docxlec4.docx
lec4.docx
 
Perl one-liners
Perl one-linersPerl one-liners
Perl one-liners
 
Shell Scripts
Shell ScriptsShell Scripts
Shell Scripts
 
Perl Moderno
Perl ModernoPerl Moderno
Perl Moderno
 
Introduction to Perl
Introduction to PerlIntroduction to Perl
Introduction to Perl
 
Perl Intro 4 Debugger
Perl Intro 4 DebuggerPerl Intro 4 Debugger
Perl Intro 4 Debugger
 
Php Reusing Code And Writing Functions
Php Reusing Code And Writing FunctionsPhp Reusing Code And Writing Functions
Php Reusing Code And Writing Functions
 
PSGI and Plack from first principles
PSGI and Plack from first principlesPSGI and Plack from first principles
PSGI and Plack from first principles
 
Text mining on the command line - Introduction to linux for bioinformatics
Text mining on the command line - Introduction to linux for bioinformaticsText mining on the command line - Introduction to linux for bioinformatics
Text mining on the command line - Introduction to linux for bioinformatics
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Introduction to Modern Perl
Introduction to Modern PerlIntroduction to Modern Perl
Introduction to Modern Perl
 
Internet Technology and its Applications
Internet Technology and its ApplicationsInternet Technology and its Applications
Internet Technology and its Applications
 

Mehr von Marcos Rebelo (6)

Store stream data on Data Lake
Store stream data on Data LakeStore stream data on Data Lake
Store stream data on Data Lake
 
Coordinating external data importer services using AWS step functions
Coordinating external data importer services using AWS step functionsCoordinating external data importer services using AWS step functions
Coordinating external data importer services using AWS step functions
 
Mojolicious
MojoliciousMojolicious
Mojolicious
 
Perl5i
Perl5iPerl5i
Perl5i
 
Modern Perl
Modern PerlModern Perl
Modern Perl
 
Perl Introduction
Perl IntroductionPerl Introduction
Perl Introduction
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Perl In The Command Line

  • 1. Perl in the Command Line
  • 2.
  • 3. It will execute BEGIN , UNITCHECK , CHECK , and use blocks, because these are considered as occurring outside the execution of your program.
  • 4. It will not execute INIT and END blocks.
  • 5.
  • 6. -W: Enables all warnings regardless of no warnings or $^W .
  • 7. -X: Disables all warnings regardless of use warnings or $^W .
  • 9.
  • 10. -d:DProf : executes the program using the Devel::DProf profiler, combined with dprofpp may help you to find where is your program slow.
  • 11. $> perldoc perldebtut $> perldoc perldebug
  • 12.
  • 13.
  • 14. $> perl –Mdiagnostics script.pl Get better error message.
  • 15. perl -MLWP::Simple -e 'print get($ARGV[0]), " "' http://perl.com Better as an alias.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. or the simpler $> perl -pe ' s/PHP/Perl/g ' in.txt
  • 21. It's very common to see command line programs that use Unix I/O redirection like this: $> perl -pe 's/PHP/Perl/g' in.txt > out.txt
  • 22.
  • 23. -i[extension] : edit in place. Case extension exists the original file is renamed, otherwise the file is overwitten.
  • 24. If the extension doesn't contain a * , then it is appended to the end of the current filename. If the extension does contain one or more * characters, then each * is replaced with the current filename.
  • 25.
  • 26. It assigns $ to have the value of octnum . Without octnum, $ will be assigned to $/ .
  • 27.
  • 28. Adds $ (the output record separator) to each print
  • 29.
  • 30. -F: choses a diferent separator
  • 31. perl -F, -ane 'print join " ", @F' data.csv converts a csv into a tsv. Not really true but enough for example propose.
  • 32.
  • 33. Q&A