Perl Version 21 PDF Print E-mail
User Rating: / 11
  WorstBest
Tuesday, 26 June 2007
     Subject: [comp.lang.perl.misc] New Perl features
Date: 13 Dec 1995 23:45:34 GMT
From: Andrew J Cosgriff

On 11 Dec 1995, Bullocks wrote:
> Hello comp.lang.misc.perlers:
> I know that you can doing interesting
> thing's with text in perl, like use the
> $underline = "\c[[4m"; To underline text.
> And the \b character to make it like neat.
> I was wondering if there is any way
> that you could make text fade in per se.

Sure, you can use the fadein() function, which takes arguments that let you specify delay times, colors, ramp functions, and blink rates. Unfortunately, Larry isn't going to implement it until Perl version 21. Here are some other useful features planned for Perl 21:

mindmeld()
Direct neural interfacing, using socket-like ports.
alarmclock()
with am/fm radio, snooze, and 24-hour display option.
whatimeant{ }
within this construct, Perl 21 will compile and execute what you actually intended to write, rather than what you did program. (This will almost completely eliminate the use of the -w option.)
New Regular Expressions
New regular expression operators that will let you match non-roman symbols. For example, you will be able to specify a pattern of Kanji or Katakana brushstrokes.
cleanup()
processes text, replacing any dirty words (in English, German, Japanese, and Tagalog) with cleaner equivalent expressions. Since you'll be able to specify a level of cleanness as an integer, negative values will be useful at times.
binmode()
automatically puts machines that use obsolete operating systems into a bin.
callerid()
a more advanced form of the caller() function, used in debugging subroutines that may not really want to be called.
mince(), dice(), slice(), puree()
a series of refinements to the chop() function. To varying extents, these remove from a variable just the parts that you intend to remove.
spoon()
like the fork() function, but the child process snuggles up to the parent process in response to a SIGBADDREAM during sleep().
getcoffee()
despite this function's misleading name, it actually can fetch any beverage listed in your /etc/foodserv.
hex()
uses the curses module.
Triple quotes
while single quotes don't interpolate their contents, and double quotes interpolate variables, triple quotes actually evaluate and synthesize their contents, yielding the value _described_. That is to say, it is quite useful to evaluate the value of "term paper for Physics 215" or "next week's winning lottery numbers" inside triple quotes.

I can't speak for the rest of you, but I'm really awaiting these new features. I just hope that I don't have to rewrite too many of my old scripts to be compatible with Perl 21.


Reddit!Del.icio.us!Google!Netscape!Technorati!StumbleUpon!Newsvine!Furl!Yahoo!Ma.gnolia!Free social bookmarking plugins and extensions for Joomla! websites! title=
 
Next >

Surprising Facts

  • "Dreamt" is the only English word that ends in the letters "mt."