Perl Code Snippets

Perl Search for Files and Directories # Use the file module to find filesuse File::Find;  # Current file can be accessed by $File::Find::name# Inside the sub you can apply any command for example# changing the file mode to 777find (sub …

Read more »

Perl DBI Connect Example

Here is a sample code snippet to connect and access an informix database using Perl DBI #!/usr/bin/perl # DBI moduleuse DBI ; # Database handler$dbh = DBI->connect("DBI:Informix:$db_name"); # Statement handler$sth = $dbh->prepare("$sql"); # Execute statement$sth->execute(); # For each row in the tablewhile (@row = $sth->fetchrow_array()){ …

Read more »

Perl Read File Line by Line

The following Perl code reads and replace some text in a file. Two code snippets are provided to read a small file and a large file: Reading a Small File #!/usr/bin/perl # Open file for readingopen(IN,"in.txt") or die "Cannot open file: …

Read more »

SCCS Commands in Unix

This is my cheat sheet for SCCS the UNIX source code control system SCCS Commands To edit a file: sccs edit <filename> To unedit a file: sccs unedit <filename> To check in a file: sccs delget <filename> To list all …

Read more »

Wavelet Edge Detection Tutorial

Introduction Image edge detection refers to methods of identifying points in a digital image where brightness changes sharply. Mathematically speaking we are looking for points of discontinuity of the intensity function of the input image. The purpose of detecting edges …

Read more »

LZW Compression Method

LZW Algorithm: Introduction It is beyond our imagination to specify a ceiling for the amount of information that an individual or a group of people potentially need to store and/or exchange. Using computer systems, almost all kinds of information can …

Read more »

Sikuli Selenium Robot Framework Tutorial

Introduction In this tutorial I will demonstrate how to integrate Sikuli (open source image based test automation tool) and Selenium (object based web automation framework) into Robot Framework (keyword and data driven test automation framework). This is not a Robot …

Read more »

Page 10 of 29« First...89101112...20...Last »