Perl

Q: How do I connect to a MySQL database from a perl program? I like to connect to an existing mysql database and select records from a particular table. Can you explain with a simple working example?

A: You should use perl DBI module to connect to a MySQL database as explained below.
(more…)

In our previous test automation article, we learnt about how to write testcases for a simple perl script using Test::Simple and prove command.

In this tutorial, we’ll explore advanced perl testing functions that are part of Test::More perl module.
(more…)

How to Force Install a Perl Module using CPAN

by Ramesh Natarajan on June 7, 2013

On an ongoing basis, I’ll be answering some of the questions asked by TGS readers. If you have any questions, use the contact form to get in touch with me.

The following question is from one of the regular readers of TGS.

Question: I’m trying to install a perl module using CPAN, and it displays “make test had returned bad status, won’t install without force”. How do I force install this CPAN module?
(more…)

Introduction to Perl Testing Using Test::Simple and Prove

by Balakrishnan Mariyappan on February 4, 2013

Testing is an important part of SDLC activity. By automating the testing process, you can save considerable amount of time spent on testing. There are several modules available in Perl to automate testing process.

In this introduction article, let us discuss about how to write basic and simple test cases using Test::Simple module in perl.
(more…)

SWIG Perl Examples – How to Interface Perl to C Using SWIG

by Lakshmanan Ganapathy on March 21, 2012

SWIG stands for Simplified Wrapper and Interface Generator.

SWIG is used to simplify the task of interfacing different languages to C and C++ programs.

For our discussion, in this article we will explain how to use SWIG to interface from Perl to C programs.
(more…)

5 Useful Perl 5.10 Features – Say, State, ~~, Defined OR

by SathiyaMoorthy on January 30, 2012

Even though Perl 5.10 is an old release, there are few things that was introduced in Perl 5.10, which you might find it useful.

In the future article of this series, we’ll be covering new features of Perl 5.14

These are the 5 new Perl 5.10 features that you might find helpful.
(more…)

If you want to manipulate excel files programmatically, you can use Perl Spreadsheet module, which provides an object interface that makes it easier to create and parse Excel files.
(more…)

2 Memory Regression Perl Scripts for Linux

by SathiyaMoorthy on November 4, 2011

During performance testing of your application you might want to perform some sort of memory regression testing. This article contains two memory regression scripts that are written in perl which will occupy a specific amount of memory for a certain amount of time, for your testing.
(more…)