Perl Programming Tutorials

PERL Programming Tutorials And Articles
  Title / Author Reverse Sort Order Replies
Connect to a MySQL server using Perl. In order to do that you'll have to use the DBI module in Perl. Below you will find an example code. #!/usr/local/ActivePerl-5.6/bin/perl -- print "Content-type: text/html\n\n"; print "<html><head><title>Database Test Page</title></head><body...
While modern browsers will work around many syntax problems in your HTML, if you want to ensure consistent pages across multiple browsers, it's a good idea to check the syntax. That's where HTML::Lint comes in. We'll show you how to use this powerful syntax-checking tool. Modern browsers...
Showing a page process time in the page footer is a common thing in many sites, some sites even take it forward by showing DB query time and processing time separately. In this tip, we'll see how to show page process time in perl. For this purpose we'll require the perl module Time::HiRes...
A hash is a data structure that associates keys with values. The primary operation it supports efficiently is a lookup: given a key (e.g. an employee's id), find the corresponding value (e.g. that employee's name). It works by transforming the key using a hash function into a hash, a number that is...
Introduction One of the strengths of PHP when it comes to arrays is considered to be the in_array function (, this function takes two parameters; the array and the item to be searched in the array and then returns a boolean result whether the item exists in the array....
Introduction Usually we run various scripts like newsletter mailer, backup scripts, etc. which take quite a lot of time, making us think of some ways to make it faster. One way to make it faster is to run some operations in parallel, like sending email to 20 subscribers in parallel for the...
Introduction To Hashes In Perl ( Preserve Add Order Perl doesn't guarantee the order of the elements of hash, they may be in a different order everytime you access the hash. It's a much wanted, rather expected behaviour that I get my elements...
In rashida.par's Recursive function to find X to the power n ( I see that she intelligently used recursion to find the power of x to n. So, I was wondering whether we can do this iteratively also, I always do that - trying to find a iterative solution...
Introduction Templating, you can say is a way to separate the business logic from the presentation logic. Most of the world's we application developers use either embeded scripting languages like PHP, JSP, ASP etc. while other use print statments in the scripting languages to output their...
Here are a few tips & tricks which you may find useful when dealing with files/directories in Perl. Perl Test Operators +-------------+------------------------------------+ | Operator | Function | +-------------+------------------------------------+ ...
Introduction CSV is a comma separated value data file is a physical ASCII file structure that contains records whose values are delimited or separated by commas. CSV is a common file type which can be imported into spreadsheet applications such as MS-Excel, database applications such as...
When Perl is given a file to execute or a string as a command line option (using -e), it needs to parse the contents, check it for syntax errors, and, if all is fine, execute it. Perl makes this feature available to the programmer through the eval string form. This contrasts powerfully with...
See the following questions. It will improve your PERL knowledge. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Question 1 How do you perform a forward declaration of a subroutine performed? Choice 1 forward sub name; Choice 2
Introduction IRC is a very easy protocol to communicate with once you get the basics. I'll be showing how to create a 'bot' (=robot) in the well-known scripting language Perl. All the commands sent to the server can also be ported to any other programming or scripting language. I will not go...