Unix Review > Columns > Perl Advisor
 Perl Advisor   Randal L. Schwartz 

It's All About Context

A recent article on Slashdot (www.slashdot.org) discussed the surprising story of a high-school student who made a small Perl programming mistake that got him into a big amount of trouble. On his dynamically generated Web page, he had used the code:

my($f) = `fortune';

when what he should have done was:

my $f = `fortune';

more->

  


 

It's All About Context  May 2001
Randal's advice: When hacking Perl, get the text right. Don't let a context-sensitive Perl operator land you in jail.

Perl Advisor: A MIME Is a Terrible Thing to Waste  April 2001
Using MIME::Tools, Schwartz combats spam by creating a Perl filter that recognizes HTML email and strips the HTML fork.

What is That, Anyway? January 2001
Have a directory full of stuff you don't remember? Perl has many built-in operators to help you figure out what it is.

So What's the Difference? December 2000
A lot of common programming is dealing with things that change. Things do indeed change, and sometimes we'd like to know how they changed.

Little Acts of Magic  October 2000
When it comes to text manipulation, Perl can perform virtual acts of magic.

Taint so Easy, Is It?  August 2000
If you've been reading my columns for any length of time, you've probably seen me mention "taint mode", usually briefly while I'm describing a "hash-bang" line of something like: #!/usr/bin/perl -Tw

Getting It to Look the Way You Want   May 2000
For the most part, Perl programmers tend to use the nice standby print operator for output, or drift occasionally into the realm of formats to quickly lay out a look for a customized report. However, the often overlooked printf operator provides a nice amount of custom control to get those output strings to look exactly the way you want.

Rainy Day Template Fun   March 2000
I grew up (and still reside) in Oregon, well known for having rain nearly all parts of the year. However, the months around April seem to have been particularly wet, and as a child, I'd often end up doing "indoor" activities during the heaviest rainy days.

 

 

 
About Randal :

Randal L. Schwartz is a two-decade veteran of the software industry -- skilled in software design, system administration, security, technical writing, and training. He has coauthored the "must-have" standards: Programming Perl, Learning Perl, Learning Perl for Win32 Systems, and Effective Perl Programming, as well as writing regular columns for WebTechniques and Unix Review magazines. He's also a frequent contributor to the Perl newsgroups, and has moderated comp.lang.perl.announce since its inception. His offbeat humor and technical mastery have reached legendary proportions worldwide (but he probably started some of those legends himself). Randal's desire to give back to the Perl community inspired him to help create and provide initial funding for The Perl Institute (perl.org). He is also a founding board member of the Perl Mongers (pm.org), the worldwide association of "Perl users groups". Since 1985, Randal has owned and operated Stonehenge Consulting Services, Inc.

Sys Admin Spotlight

CMP DevNet Spotlight

Global Web Site Performance Improvement
Jeffrey Fulmer explains how to get a comprehensive picture of your site's performance and describes some tips for improving it.

In the News

CD-ROM

Sys Admin and The Perl Journal CD-ROM version 11.0

Version 11.0 delivers every issue of Sys Admin from 1992 through 2005 and every issue of The Perl Journal from 1996-2002 in one convenient CD-ROM!

Order now!




MarketPlace

Get the ports you need for your VMs to succeed.
HP network adapters help get the most from your virtualized servers. Learn more at HP.IntelVT.com.

BugSplat - Automatic Crash Analysis
Fast online exception analysis. Capture customer crash data online.

Flowcharts from C/C++ code -- Free trial download
Understand C/C++ code in less time. A new team member ? Inherited legacy code ? Get up to speed faster with Crystal Flow for C/C++. Code-formatting improves readability. Flowcharts are integrated with code browser. Export flowcharts to Visio.

Discover WinDev 11 RAD
and develop 10 times faster ! ALM, IDE, .Net, PDF, 5GL, Database, 64-bit, etc. Free Express version

Wanna see your ad here?