 |
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...
By pradeep
Last Message By Scripting
|
2 2,570 |
 |
Introduction
We all write programs to run on the terminal to do jobs that take time, like processing logs, sending out newsletter, etc. To know the progress of our task we print some messages to know our program is running well and doing its job. But wouldn't it be nice if we could add a...
By pradeep
Last Message By PradeepKr
|
5 11,604 |
 |
As Perl programmer we might want to shoot off a mail for some reason or the other, especially if we've used Perl for the web. Perl being such a powerful language, it's can do virtually anything you want to do with it. Sending a mail is a piece of cake, be it using sendmail or using SMTP. CPAN is a...
By pradeep
Last Message By pradeep
|
10 17,185 |
 |
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....
By pradeep
|
0 4,260 |
 |
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...
By pradeep
Last Message By pradeep
|
8 17,400 |
 |
Have you ever wondered how a search engine like Google works? Well, it uses web crawlers and web spiders which “crawl” the web from one URL to all connected URLs and so on retrieving relevant data from each URL and classifying each web page according to some criteria and storing the URL and related...
By blitzcoder
Last Message By Monstar
|
5 12,823 |
 |
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.
...
By pradeep
Last Message By AllyUnion
|
6 143,650 |
 |
This is a password generator script that I have written. Any feedback, critique or suggestions would be much appreciated.
#!/usr/bin/perl
## ***************************************************************************
#
# genpass v1.0 (06.2007) Password Generation Program
# ...
By munkyeetr
Last Message By vile
|
6 13,942 |
 |
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);
By pradeep
Last Message By sorin25
|
3 60,710 |
 |
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
By ungalnanban
Last Message By rahuliet2008
|
2 10,154 |
 |
The normal idea is to have an hash table, iterate over the array and using the elements as keys.
Something like ::(
my @array = (1,5,3,7,9,1,4,5,7,6,7);
my %hash;
foreach my $element (@array) {
$hash{$element}++
}
By oleber
Last Message By pradeep
|
6 5,377 |
 |
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...
By shree
Last Message By oleber
|
7 12,189 |
 |
For my first thread i will post my new twitter bot/rat.
This will only work on linux and possibly mac
Its more of a funny prank than a rat, but it can be used for malicious purposes.
You need to get your victim to open the .pl file on their computer and leave it open, if your using this on...
By gotroot
Last Message By shabbir
|
7 3,219 |
 |
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;
By oleber
Last Message By oleber
|
2 5,055 |
 |
As the world is fast becoming aware of the benifits of XML, perl developers would also want to use XML in their CGI-Perl scripts. XML parsing seems to be one hell of a job when you look at the XML::Parser module, but XML::Simple comes to the rescue with the ease of use it brings.
Installing...
By pradeep
Last Message By rajseo
|
4 45,704 |
 |
There are many ways to send email from a Perl script, one the all time popular being using sendmail. But, there are other ways of sending emails, one of which is using the module Net::SMTP.All you have to do is to include the Net::SMTP module in your script and try using the example below.
...
By pradeep
Last Message By espi3030
|
9 60,261 |
 |
How often have you wanted to find out the current user's name or system group within a shell script? Or wanted to get the current process ID?
Well, if you're using Perl, it's nowhere near as difficult as you might think. That's because Perl comes with a library of functions designed...
By pradeep
Last Message By tarunt
|
1 23,950 |
 |
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...
By XXxxImmortalxxXX
Last Message By Fatboy12345236
|
4 10,808 |
 |
Getting a recursive listing of all the specified directories within a specified path using FTP. We sometimes requires to calculate the number of directories or the number of files, and sometimes even the total size of files inside the specified directory.
The following code is written to get the...
By pradeep
Last Message By caesurus
|
6 24,024 |
 |
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...
By pradeep
Last Message By shabbir
|
2 6,660 |