FREE Java™ Developer Resource Kit!
06.22.04

Perl's Special Variables
One of the best ways to make your Perl code look more like ... well, like Perl code -- and not like C or BASIC or whatever you used before you were introduced to Perl -- is to get to know the internal variables that Perl uses to control various aspects of your program's execution.

In this article we'll take a look at a number of variables that give you finer control over your file input and output.

Counting Lines I decided to write this article because I am constantly amazed by the number of people who don't know about the existence of $.. I still see people producing code that looks like this:
Read The Whole Article

Using The Perl Debugger
Perl aficionados might find this hard to believe, but to a lot of people, Perl is - to put it bluntly - one of the most terrifying languages on the planet.
There are a number of reasons for this, and only some of them are unwarranted. Novice developers find the language's sometimes-complex syntax intimidating, and its freewheeling "there's more than one way to do it" attitude confusing. The special symbols and variables that experienced Perl developers sprinkle liberally around their code (can you say @_?), coupled with the intricacies of Perl variable scoping, regular expressions, object-oriented programming and modules, can leave them bewildered and weak at the knees, and the language's terse error messages only serve to increase their frustration when things go wrong.
Read The Whole Article


Using perl to connect to remote hosts via telnet
Suppose you needed to open a connection to a remote host from within your perl program. One thing you would probably think of doing at first is the following:

open TELNET "|telnet $hostname"; print TELNET "$username "; print TELNET "$password "; ... Unfortunately, if you try this, you'll find it doesn't work. The telnet program connects to the remote host but it completely ignores any commands you pipe to it. That's because the telnet program reads it input only from the terminal and not from standard input.
Read The Whole Article

How To Read And Write Perl Data Files
In Perl, reading and writing to files is pretty straightforward. First you have to open a file. Depending on your task, you read data from or write data to the file, then you close it.

How to open files in Perl To open a file in Perl, use the open function.

======= open( FILE_HANDLE, filename) or die "Your message goes here " ; =======
Read The Whole Article

Convert your keywords to sales! Try Urchin for free - Download Now

Using Perl code from PHP
PHP and Perl are two very popular Web programming languages. They both have many libraries and extensions that can simplify the process of development, but often you can find a Perl library you want, and not the corresponding library in PHP. (Perl is older then PHP, so naturally it has a larger selection of libraries and extensions.) This was the main reason that the Perl extension for PHP was written.

Many large projects use both PHP and Perl, with some subsystems implemented in PHP, and others in Perl. Often these subsystems need to communicate with each other, and some Perl modules - such as PHP::Include and PHP::Session - have been implemented to achieve this (see

http://www.cpan.org/modules/by-module/PHP/ for more information). However, although they allow PHP session files to be read, PHP variables to be serialized and simple PHP code to be executed from within Perl, there is no real communication between the two interpreters.
Read The Whole Article

Performing SQL operations through Perl
This article explains on how to perform operations on your database through Perl, using the DBI module. This assumes that you have basic knowledge about Perl/CGI and SQL. We will be making a simple table and performing basic SQL operations on it.

Comments Like all Perl code, this code too is self explanatory. If you need detailed information, don't hesitate to use the article forums.

Example one Creating a table.
Read The Whole Article




Read this newsletter at: http://www.perlpronews.com/2004/0622.html

Free Newsletters
Part of the iEntry Network
over 4 million subscribers
PerlProNews
DevNewz
WebProASP


Send me relevant info on products and services.


 

 

From the Forum:
how to use SSH ?

I know there are lots of masters present on this great site ... can anyone help ... iam very very new to this n i even don't know what is it accept one thing that it helps to upload files on my server ... thats all i know about it ... how to use it thats ma problem ...

Read the Post

 

-- PerlProNews is an iEntry, Inc. publication --
iEntry, Inc. 880 Corporate Drive, Lexington, KY 40503
2004 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article




PerlProNews Home Page About iEntry Article Archive News WebProWorld Forums Jayde iEntry Contact Advertise Downloads iEntry WindowsDailyNews.com HiTechEdge.com