Last time I explained how YouTube videos can be downloaded with gawk programming language by getting the YouTube page where the video is displayed and finding out how the flash video player retrieves the FLV (flash video) media file. This time I'll use Perl programming language which is my favorite language at the moment and write a one-liner which downloads a YouTube video. Instead of parsing the YouTube video page, let's look how an embedded YouTube video player on a 3rd party website gets the video. Let's go to this cool video and look at the embed html code: For this video it looks as following:
Lincoln Stein and Doug MacEachern One of the minor miracles of the World Wide Web is that it makes client/server network programming easy. With the Common Gateway Interface (CGI), anyone can become a network programmer, creating dynamic Web pages, front-ends for databases, and even complex intranet applications with ease. If you're like many Web programmers, you started out by writing CGI scripts in Perl. With its powerful text-processing facilities, forgiving syntax, and tool-oriented design, Perl lends itself to the small programs for which CGI was designed.
;login: February 2013, Volume 38, Number 1 In the February issue: Flat Datacenter Storage Samba’s Way Toward SMB 3.0 Temperature Management in Datacenters: Cranking Up the Thermostat Without Feeling the Heat Allen Wittenauer on Hadoop: An Interview Kadeploy3: Efficient and Scalable Operating System Provisioning for Clusters The Owl Embedded Python Environment: Microcontroller Development for the Modern World Plus columns, book reviews, conference reports, and more ;login: April 2013, Volume 38, Number 2
Perl is full of secrets that can make your life as a Perl programmer easier - if you know about them. In this article I present a handful of Perl tips and tricks that some Perl programmers may not have come accross and may find useful. Want to know what OS you are running under?
perlopentut - tutorial on opening things in Perl Perl has two simple, built-in ways to open files: the shell way for convenience, and the C way for precision. The choice is yours.
I've recently started learning to play the game of Go. Go and Perl have many things in common -- the basic stuff of which they are made, the rules of the game, are relatively simple, and hide an amazing complexity of possibilities beneath the surface. But I think the most interesting thing I've found that Go and Perl have in common is that there are various different stages in your development as you learn either one. It's almost as if there are several different plateaus of experience, and you have to climb up a huge hill before getting onto the next plateau.
Perl is a dynamic programming language created by Larry Wall and first released in 1987. Perl borrows features from a variety of other languages including C, shell scripting (sh), AWK, sed and Lisp. Structurally, Perl is based on the brace-delimited block style of AWK and C, and was widely adopted for its strengths in string processing, and lack of the arbitrary limitations of many scripting languages at the time. Larry Wall began work on Perl in 1987, while working as a programmer at Unisys, and released version 1.0 to the comp.sources.misc newsgroup on December 18, 1987.
mod_perl is an optional module for the Apache HTTP server . It embeds a Perl interpreter into the Apache server, so that dynamic content produced by Perl scripts can be served in response to incoming requests, without the significant overhead of re-launching the Perl interpreter for each request. As Lincoln Stein defined mod_perl in his words: mod_perl can emulate a Common Gateway Interface (CGI) environment, so that existing Perl CGI scripts can benefit from the performance boost without having to be re-written. Unlike CGI (and most other web application environments), mod_perl provides complete access to the Apache API , allowing programmers to write handlers for all phases in the Apache request cycle, manipulate Apache's internal tables and state mechanisms, share data between Apache processes or threads , alter or extend the Apache configuration file parser , and add Perl code to the configuration file itself, among other things. [ edit ] See also
NOTE: This article first appeared in SysAdmin Magazine in January 2005. The mod_perl API has changed since that time and the following code examples will require slight modification to work I often run into people who are confused about what mod_perl is.