 |
|
^ click above ^ |
06.10.04
Thinking
In Perl
Not many people would argue that Perl is not one of the most flexible
and useful scripting languages available today. Most, however, cannot
look past that to see it as a programming language, and a powerful
one at that. No one will argue that they could develop a prototype
of a product in Java faster than they could in Perl, yet most would
abandon Perl as soon as development "gets serious." After all, Perl
is just a scripting language. No one in their right mind would attempt
to use it for anything besides CGI and gluing other programs together.
The fact is, Perl should be taken more seriously as a programming
language. The problem is that most of the Perl material in the world
has been developed as either a fancy shell script or a stripped down
prototype for C and Java projects. The very things that attract people
to using Perl for these quick and dirty hacks also stagnate their
progress in the language. Most instuctional Perl material only teaches
enough to get an interested programmer informed enough to write shell
or C programs in Perl.
Read
The Whole Article |
Array
Manipulation in Perl
Over the course of this tutorial, I'll be examining Perl's arrays
in detail, explaining what they are, how they work, and how you can
use them to get things done faster, better and cheaper. In addition
to providing a gentle introduction to Perl arrays and hashes in general,
this article will also offer you a broad overview of Perl's array
manipulation functions, providing you with a handy reference that
should help you write more efficient code.
If you're like most Perl developers, you probably use arrays extensively
in your development activities, as a convenient way to store related
data values together. However, if you're like most developers, it's
also quite likely that your knowledge of array manipulation techniques
is limited to counting the elements of an array or iterating through
key-value pairs. Although it might seem like sufficient for daily
use, this limited knowledge can actually hamper your efficiency, by
forcing you to write lines of code to perform tasks that could be
handled more effectively through a built-in array function - all because
you didn't know better!
Read
The Whole Article
Cleansing
Data in Perl with UNTAINT
Perl CGIs that are intended to run on Webster must use "taint checking"
— an automatic security checking facility that helps avoid errors
in programs that could jeopardize user or system files. The UNTAINT
procedure provides simple and timely testing of the scripts, as well
as improving the security of these scripts.
Making sure there is good data from a user's form
Suppose you wrote a CGI that accepts input from a web form, and then
executes that command using a command line shell. It would be quite
useful: almost as useful as having a login shell on the computer.
Read
The Whole Article
Socket
Programming in PERL
In this article, Rahul shows us how to create a client-server socket
program in Perl and then demonstrates it by pinging the server.
What is a socket? Just another bit of computer jargon? Devling a little
into networking history, it is a Berkeley UNIX mechanism of creating
a virtual duplex connection between processes. This was later ported
on to every known OS enabling communication between systems across
geographical location running on different OS software. If not for
the socket, most of the network communication between systems would
never ever have happened. Read
The Whole Article
| Website
Ranking Manager With an extensive set of built in web reporting
tools this is the clear choice for anyone engaged in a web promotion
campaign. >>Free
Trial |
How
to lock files in Perl
Basically, a lock is some kind of action that blocks further processing
on a file until it is explicitly told to stop. This action may be
a system call or a subroutine in your script, as long as it keeps
a file from being opened or read from for a specific amount of time.
In Perl, the easiest way to lock a file is to use flock(). A simple
counter script is presented below to show you how. But first, let's
look at some general principles you'll need to know.
In programming terms, the section of code between the lock and unlock
commands is called a critical section. Because no processing may occur
on a file while it is locked, it is important to keep critical sections
as short as possible. Typically, files are opened, locked, read from
or written to, unlocked and then closed. Read
The Whole Article Affrus:
An OS X Perl IDE
When I last reviewed a Perl IDE, ActiveState's Komodo, I was nearly
convinced; the only problem was that I use Mac OS X. Now, Late Night
Software, more commonly known for their AppleScript tools, have taken
their Mac programming experience and applied it to create Affrus,
a Perl IDE for the Mac. And I'm a little closer to being convinced.
Affrus differs from Komodo in some substantial ways. Where Komodo
couples its editor tightly with a Perl interpreter to allow background
syntax checking and on-the-fly warnings highlighting, Affrus takes
a more traditional, detached approach: syntax checks are performed
on demand, with errors and warnings placed in a separate panel. Fans
of emacs's debugging modes will be happier to see this: Read
The Whole Article
Read this newsletter at:
http://www.perlpronews.com/2004/0610.html |
|
| From
the Forum: |
| Mysterious
Error in Safari only |
My client is using Safari 1.2,
and I developed the web application under windows environment.
Currently I am running to the browser compatibility issue.
Program runs fine under IE, Mozilla, Opera, and Konqueror
(Linux). But it doesn't work properly under Safari (Mac).
...
|
 |
|