Perl Programming Tutorials

PERL Programming Tutorials And Articles
  Title Reverse Sort Order / Author Replies
Views
After allot of searches like 'find . -type f -exec grep main {} -H \;' I implemented a small program :eek:. ;) This program uses the normal 'file' shell command to check if a file is a text file. ;) Ignores files inside /CVS/. They are there, but who cares? ;) Clearly...
1
7,348
Well this has been out for quite sometime now, so i thought to share with all out here. Heres a PERL script demonstrating how to retrieve the data from the Google Suggest Drop Down Autocomplete and use it as you please! This was developed by John Bokma , but worked in command line only. So i have...
0
8,155
Introcution Amazon's S3 is a really amazing service, where you can store unlimited amount of data at a very cheap rate, and the service being really reliable at the same time. Signing up for the service is really easy, you are charged a very low rate only for what you use, you can read more about...
1
4,911
Introduction POP3 stands for Post Office Protocol version 3, it's application layer Internet Protocol used by various desktop email clients, and web-based email services to fetch email from a remote server over a TCP/IP connection. Until sometime back POP3 was the de facto standard for email...
0
14,713
Ceil in Perl Cieling is basically outputing the next largest integer for an given real number. ceiling(x) is the smallest integer not less than x Ways to do it in Perl, a) using our own logic my $num = 45.4; my $ceil = int($num + 0.99);
3
71,229
How to direct a browser to display a different HTML page This is actually very simple to do in a CGI script. Instead of the usual header Content-type: text/html #make your script print this Location: URL to display #Don't forget the blank line afterwards. -or- print...
0
8,852
Introduction May times we require to check whether a process is running or not, may be for the purpose of maintaining a lock file for a process or for some other reason. Here today we'll discuss a technique in which we can do this checking provided the process/pid being checked is checked is...
8
18,993
Most modern day websites take inputs from user in the form of comments, reviews, PMs etc. and it's needed to control the HTML tags in the users' content to prevent XSS attacks, spamming with URLs, embedding videos - which might attract copyright problems - and similar problems. Many sites list...
2
4,337
Many programs use the STDOUT to produce some normal output and the STDERR to show the errors. I'm actually working with the g++ that do this and a question appeared. Wouldn't be nice to see it with different colors? #!/usr/bin/perl use strict; use warnings; use IPC::Open3;
2
5,653
Introduction Pagination is a very basic requirement of a web application, in this article we'll see how to implement pagination easily using the Perl module Data::Pageset. Basically there are two types of pagination, Jumping and Sliding. In the jumping type the current page jumps from the...
2
8,075
Here are a few tips & tricks which you may find useful when dealing with files/directories in Perl. Perl Test Operators +-------------+------------------------------------+ | Operator | Function | +-------------+------------------------------------+ ...
0
4,790
Working with dates is a very common feature of any application, be it a web app or a desktop one. Some people consider Perl to be a language where working with dates is hard, but basically it's quite easy if you know how to. Datetime is a common term while refering to date and time together. ...
6
151,153
Below is a small Perl code that Shows all the environment variables of the Server on which it is run. #!/usr/bin/perl print "Content-type: text/html\n\n"; print "<tt>\n"; foreach $key (sort keys(%ENV)) { print "$key = $ENV{$key}<p>";
0
3,877
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...
3
22,637
JSON has become a popular data representation format, and can been seen as the successor of XML which used to be the most popular format used for data exchange between systems. Notable examples of JSON being used for data representation are Facebook Graph API & Flickr API, amongst many others....
0
8,266
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...
0
3,830
Introduction One of the strengths of PHP when it comes to arrays is considered to be the in_array function (http://php.net/in_array), 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....
4
31,423
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...
4
12,508
In rashida.par's Recursive function to find X to the power n (http://www.go4expert.com/showthread.php?t=9307) 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...
1
11,698
List of common file extensions and their corresponding MIME types in a hash, which can be quite use at times. %mime_types = {'.ai','application/postscript', '.aif','audio/x-aiff', '.aifc','audio/x-aiff', '.aiff','audio/x-aiff', '.asc','text/plain', '.au','audio/basic', ...
1
3,200