We may earn an affiliate commission when you visit our partners.
Course image
John Purcell

Discover some of the amazing things you can do with Perl 5, including downloading text and images from the Internet (just like Zuckerberg in The Social Network), reformatting data, importing and exporting data to and from databases, sysadmin-type tasks like renaming or moving files, fixing even huge amounts of data quickly and even creating web CGI scripts. In this course you'll also learn how to use regular expressions, those unbelievably useful little things that have now made their way into almost every serious programming language, yet remain the bête noire of many a developer.

Enroll now

What's inside

Learning objectives

  • Learn how to use perl for a variety of common tasks
  • Learn how to use regular expressions

Syllabus

Basic Perl: Getting Started
An overview of what kind of stuff is going to be in the course, various options for installing Perl and a bit about various free editors.
Read more

Note: this will only work on http sites, not https. See previous video.

In "The Social Network", the character based on Mark Zuckerberg uses Perl to download images from the Internet. It's easier than you think, and we'll see how to do it in this tutorial. NOTE: My website has been updated since this tutorial, so please choose a different image to download other than my logo when you try this tutorial. Or, download my logo, but please be aware that the path has changed. You can easily find the new path by right-clicking the image you want to download in your browser, going to "view image" or the equivalent, and noting the path.








The opposite of "split" is "join"; joining strings in an array together in one line. This is handy for creating SQL statements and also for debugging arrays; but even handier for debugging is the Data::Dumper, which can display any data structure, no matter how complex.







 It's easy and useful to put in a few checks to make sure your CSV data is in order.


Often you want to apply a regular expression repeatedly to the same text; for instance, to extract all images from an HTML page. There are several ways to do this; we'll look at a memory-efficient way here. Note: I've changed my website since this lecture, so where I talk about matching stuff on my site, that's no longer relevant. You can try matching something else on my site or some other site though; the stuff in the video is just an example.

If you're working with small text documents, you can collect all your matches altogether at once. This involves using a match expression in an array context; something not possible in many languages, but possible in Perl.
How to create multi-line strings and comments in Perl. Alas, this is a bit cumbersome -- at least in Perl 5.*, which we're looking at here. But you can do it, and it's very useful.

The simplest possible CGI web app just consists of a program that prints a content header followed by some text. We'll create such a program in this tutorial.

The CGI.pm module simplifies a lot of web-related tasks that would otherwise be tricky. Some parts of it are of dubious value, but others are definitely extremely helpful.

http://www.cpan.org/

http://perldoc.perl.org/

http://www.perlmonks.org/

http://stackoverflow.com/

This video actually isn't about Perl as such; it's about how to run scripts in UNIX-like systems.

Traffic lights

Read about what's good
what should give you pause
and possible dealbreakers
Covers the fundamentals of Perl programming, making it suitable for beginners
Provides practical examples and hands-on exercises to reinforce learning
Incorporates real-world scenarios, such as downloading images and reformatting data, enhancing its relevance
Introduces regular expressions, a fundamental concept in Perl programming
Assumes no prior programming knowledge, making it accessible to those new to coding
Could benefit from more advanced topics and projects for experienced learners

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Reviews summary

Perl 5: practical scripting & regex

According to learners, this course offers a practical, hands-on introduction to Perl 5, particularly strong in its coverage of regular expressions and their application to data manipulation and sysadmin tasks. The "by doing it" approach is largely effective, providing a solid foundation for scripting. However, some aspects, such as web scraping limited to HTTP sites and potentially outdated examples, are noted as a warning given the language's evolving relevance. Despite these minor issues, the course is seen as highly useful for specific Perl projects and working with legacy systems, delivering on its promise of practical application.
Instructor is generally clear, but some advanced topics are complex.
"The instructor explains basic Perl concepts very clearly, making getting started easy."
"Some parts, like passing subroutine arguments, were still challenging despite the instructor's efforts."
"The explanation of hashes and arrays of hashes was particularly well done and easy to grasp."
Wide array of Perl topics covered, from sysadmin to databases.
"I was surprised by the breadth of topics, from file manipulation to database interactions and XML parsing."
"It gave me a good overview of what Perl is capable of in different areas, like sysadmin tasks."
"Learning about Perl one-liners was an unexpected but really useful addition for quick scripts."
Comprehensive and clear explanations of regular expressions.
"The regular expressions section alone is worth the price; it made regex finally click for me."
"I was dreading regular expressions, but this course broke them down into understandable parts."
"The various regex patterns and quantifiers were explained thoroughly, with good examples."
Course excels in teaching Perl through practical, real-world examples.
"I found the 'by doing it' approach extremely helpful; it's not just theory but actual code."
"The course provides a great deal of practical examples, making it easy to see Perl's utility."
"I appreciated learning how to download images like in 'The Social Network' and other real-world tasks."
Some examples and technologies are noted as outdated.
"The web scraping section being limited to HTTP, not HTTPS, is a significant limitation in today's web."
"I found some of the code examples tied to the instructor's old website which made it confusing to follow."
"The course covers older web technologies like CGI which aren't widely used anymore."

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Learn Perl 5 By Doing It with these activities:
Organize and review course materials
Enhance your understanding of course materials by organizing and reviewing them regularly.
Browse courses on Note-Taking
Show steps
  • Gather all course materials, including notes, assignments, and quizzes.
  • Organize the materials into a logical structure.
  • Review the materials regularly to reinforce your understanding.
Review key concepts of Perl programming before starting the course
Prepare for the course by reviewing the fundamentals of Perl programming.
Show steps
  • Go through your old notes or online resources.
  • Solve some practice problems.
  • Build a small Perl program.
Find a mentor who can provide guidance on Perl programming
Accelerate your learning by finding a mentor who can provide personalized guidance and support.
Show steps
  • Identify potential mentors in your network or through online communities.
  • Reach out to them and ask if they are willing to mentor you.
  • Regularly meet with your mentor to discuss your progress and get feedback.
Six other activities
Expand to see all activities and additional details
Show all nine activities
Practice Regular Expressions
Review what you have learned about regular expressions in this course.
Browse courses on Regular Expressions
Show steps
  • Find an online regular expressions tutorial.
  • Work through the tutorial, completing all exercises.
  • Find a text file online and practice using regular expressions to extract data from it.
Practice using Perl regular expressions
Solve problems to improve your understanding and ability with Perl regular expressions.
Browse courses on Regular Expressions
Show steps
  • Go to a website like Regex101 and start solving easy regex challenges.
  • Try to find patterns in text or code in your own projects using Perl regular expressions.
  • Find a community of Perl programmers online or in person and participate in solving regex challenges together.
Follow tutorials on Perl web application development
Gain skills in building web applications using Perl by following guided tutorials.
Show steps
  • Find online tutorials or courses on Perl web application development.
  • Follow the tutorials step by step, building a simple web application.
  • Try experimenting with the code and adding your own features.
Write a blog post on a Perl topic
Enhance your understanding of Perl and improve your writing skills by creating a blog post on a Perl-related topic.
Show steps
  • Choose a topic that you are familiar with or that you want to learn more about.
  • Research and gather information on the topic.
  • Write a blog post that is informative, engaging, and well-written.
Create a Perl script to automate a task
Develop your Perl programming skills by creating a script that automates a repetitive task.
Show steps
  • Identify a task that you perform frequently and that can be automated.
  • Design and write a Perl script to automate the task.
  • Test and refine your script to ensure it works correctly.
Develop a small Perl project to solve a real-world problem
Apply your Perl skills to solve a practical problem and build a valuable project.
Show steps
  • Identify a problem that you want to solve.
  • Design and develop a Perl solution.
  • Test and refine your solution.

Career center

Learners who complete Learn Perl 5 By Doing It will develop knowledge and skills that may be useful to these careers:
Web Developer
Web Developers create and maintain websites. This course covers Perl, which can be used for web development. It may be useful for learning how to use Perl for web development.
Software Test Engineer
Software Test Engineers test and evaluate software applications to ensure that they meet quality standards. Perl can be used for software testing, so this course may be useful for learning how to use Perl for software testing.
Cloud Engineer
Cloud Engineers design and manage cloud computing systems. Perl can be used for cloud computing, so this course may be useful for learning how to use Perl for cloud computing.
Computer Programmer
Computer Programmers write code and applications for computers, using languages such as Perl. A course that covers Perl, such as this one, may be useful for learning the skills necessary for this career.
Systems Administrator
Systems Administrators manage and maintain computer systems. Perl can be used for systems administration, so this course may be useful for learning how to use Perl for systems administration.
Software Engineer
Software Engineers design, develop, and maintain software applications. Perl can be used for software engineering, so this course may be useful for learning how to use Perl for software engineering.
Information Security Analyst
Information Security Analysts protect computer systems and networks from unauthorized access and cyberattacks. Perl can be used for information security, so this course may be useful for information security analysts.
Data Analyst
Data Analysts collect and analyze data to help businesses make informed decisions. Perl can be used for data analysis, so this course may be useful for learning how to use Perl for data analysis.
Database Administrator
Database Administrators manage and maintain databases. Perl can be used for database administration, so this course may be useful for learning how to use Perl for database administration.
Machine Learning Engineer
Machine Learning Engineers design and develop machine learning models to help businesses make informed decisions. Perl can be used for machine learning, so this course may be useful for learning how to use Perl for machine learning.
Data Scientist
Data Scientists collect and analyze data to help businesses make informed decisions. Perl can be used for data science, so this course may be useful for learning how to use Perl for data science.
Network Engineer
Network Engineers design and manage computer networks. Perl can be used for network engineering, so this course may be useful for learning how to use Perl for network engineering.
Technical Writer
Technical Writers create and maintain documentation for technical products and services. Perl can be used for technical writing, so this course may be useful for learning how to use Perl for technical writing.
Quality Assurance Analyst
Quality Assurance Analysts test and evaluate software applications to ensure that they meet quality standards. Perl can be used for quality assurance, so this course may be useful for learning how to use Perl for quality assurance.
Business Analyst
Business Analysts analyze business processes and systems to help businesses improve their operations. Perl can be used for business analysis, so this course may be useful for learning how to use Perl for business analysis.

Reading list

We've selected seven books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Learn Perl 5 By Doing It.
Provides a comprehensive introduction to the Perl programming language, covering everything from basic syntax to advanced topics such as object-oriented programming and web development.
Tutorial that provides a step-by-step introduction to the Perl programming language.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser