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.
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.
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.
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.
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.
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.