Skip to Content

On Beyond Perl V

If Dr. Seuss were a Perl 6 hacker

Said Conrad Cornelius O’Donnell O’Dell
My very young friend who is just learning Perl
$, is the output field terminator
$/ is the input record separator

$0 is the program, $$ is the pid
$] is version, $( is gid
$| flushes buffers, and then there’s $*
I know all my punctuation variables like that!

On Beyond Perl V

Then he almost fell flat on his face on the floor
When I reached out and typed just a few characters more!
Combinations he never had dreamed of before!
And I said, “You can stop, if you want, with Perl V
“Because most people stop with Perl V
“But not me!
“In the places I go there are things that I see
“That I never could code if I stopped with Perl V.
“I’m telling you this ‘cause you’re one of my friends.
“My alphabet starts where your alphabet ends!”

My alphabet starts with a keyword called rule.
For building a grammar it’s the perfect tool.
You’ll be sort of surprised what there is to be found
Once you go beyond Perl V and start poking around!

So on beyond Perl V! Explore, like Leif Eric!
Discover new markers like hyper (a caret).

And then there’s the given, the name of the switch
Provided to scratch a particular itch
For the switches will ditch when the given is found
In the whens that compare to the value that’s bound.

The NAMED Blocks all play the part of a waiter.
Wherever defined, they’ll execute later.
CATCHing an error or NEXTing a loop
You’ll think you’re surrounded by alphabet soup.

So you see!
There’s no end
To the things you might know
Depending how far beyond Perl 5 you go!

$_ is smarter, and tied to the “topic”
A shy little fellow but still philanthropic.
He only appears with a for or a given,
And a few other keywords, all similarly driven,
To make that poor topic the topic indeed,
Used by defaulting constructs in all of their greed,
Til the scope of the given is left, and then,
The topic is just a plain variable again.

The places I took him!
I tried hard to tell
Young Conrad Cornelius O’Donnell O’Dell
A few brand-new wonderful features of Perl.
I led him around and I tried hard to show
There are things beyond Perl V most people don’t know.
I took him past Perl 5. As far as I could.
And I think, perhaps, maybe I did him some good…

Because, finally, he said:
“This is really great stuff!
“And I guess the old language
just ISN’T enough!”
NOW the Perl that he uses is something to see!
Most people still stop at Perl V…
But not HE!


Pronunciation Guide

Some of the symbols only fit the rhyme and meter when pronounced a particular way. Here’s how I pronounce them:

$/ - dollar-slash
$] - dollar-right-bracket
$( - dollar-left-paren
$| - dollar-pipe
$* - dollar-splat
$_ - dollar-underbar