· Offer Kaye > Perl

Offer Kaye's Perl page

What's my connection with Perl

Well, for one thing I'm an Israeli Perl Monger:

Israel PM logo

The Israeli Perl Mongers, one of many similiar Perl Monger groups spread around the world, are a group of Perl users dedicated to the advancment of the Perl programming language, specifically in Israel.
We do so by creating a stable and viable group which through an active mailing list and monthly meetings seek to help one another and learn new things regarding our favourite programming language and computer science issues in general.
In fact, Israel.pm has become so succesful that for the second year in a row we are having our very own Israeli Perl Conference, called YAPC::Israel::2004 -

YAPC::IL logo

Of which I'm one of the organizers.
If you're a Perl user and still haven't registered to the mailing list I heartly recommend you do so - it's low-volume enough not to be a bother, the signal-to-noise ratio is excellent, and I guarentee you'll learn something new and useful regarding Perl... ☺ oh, and you don't have to be from Israel, either - we already have some subscribers from abroad and all the emails are in English.

What is Perl

Actually, there is "perl" and there is "Perl". "Perl" referes to the language, while "perl" referes to the compiler.
This distinction may not matter to most people, but I think it can be a little confusing for a beginner, as for example the perl manpage starts out by giving a synopsys of the command line options available for the "perl" command (compiler), but followes this up with a section called "description" which describes the Perl language.

Learning Perl

Regardless, if you want to learn about Perl, the best way is to start reading the above mentioned perl manpage, go browse the perl.com website and the many many Perl related links it offers (the Google Perl directory is also a good links resource), and of course practice writing and using Perl.

Getting Perl

Of course, to practice Perl, you will need perl installed.
To check if it is installed, just write "perl -version" at the command line. If you don't have it installed, you'll need to get it:

Perl Oneliners

I've been studying and using Perl for the last couple of years, and recently got interested in Perl oneliners.
A Perl oneliner is like concentrated regular Perl code. If you think of regular Perl code as a swiss-army-anything, than a Perl oneliner is like a Swiss-army scalpel: short, sharp, and used for a particualr purpose.
While Perl oneliners are usually defined to be less than 80 characters in length, I've seen longer ones which I would still call a oneliner.
Because a Perl oneliner is meant for a single particular purpose, and is meant to be run from a command line and so should be as short as possible, oneliners are usually associated with Perl Golf, the practice of attempting to find the shortest (fewest keystrokes) Perl code to solve a given problem. Thus, Perl oneliners are good solutions for solving very specific problems from the command line, but should never be used for production code. To use a perl oneliner, you usually run it from the command line, as in "perl -e 'oneliner perl code'".
Following are some example oneliners, including links to explanations of the code. I think studying Perl oneliners will teach you more about Perl than any other method, due to their condensed nature, so I hope you benefit as much from these as I did.
A couple of notes: I never bothered to keep track of where I found these, and frequently I changed the original if I could see a way to make the code shorter. So if you are the original writer and want me to credit you or remove the code, please let me know. In addition, if you think up a shorter way of doing the same thing, I'd be really glad to hear of it... ☺

Perl Lectures

For now there are only 2 lectures here - one that I gave to Israel.pm on the December 2004 meeting. The title is: "Syntax Highlighting for Fun and Profit". Here are the slides, there is also a page with all the slides in one large page.
The second is a lecture about Intoduction to Perl Subroutines (there is also an "all in one" page).


Offer Kaye / To contact me, email me at: offer.kaye no spam at gmail dot com / Last Modified: Sun Dec 5 22:32:59 2004

Valid XHTML 1.0! Valid CSS!