Showing posts with label perl. Show all posts
Showing posts with label perl. Show all posts

Wednesday, April 25, 2018

Writing Client-Server Applications using IO::Socket


You should now know what a client and server program is. Simply put, a client requests a service and a server services the request. There are several ways to do this. The crudest will be to call a program within perl and pass the parameters during the call. Another way is to use pipes. A program can call another program but the input to the called program will be passed through the STDIN of the other program. Both methods are crude and allow only for simple passing of input and output. Another way to do this is using sockets.

Sockets allow two programs to communicate with each other. The server binds a port on the machine. The client connects to that port to communicate with the server

Writing Client-Server Applications in Perl: Introduction


The traditional architecture for applications is the stand-alone architecture. With this, all components of an application is executed in one giant program. This is ok if the application is meant to be used by one person on one machine at a time.

With the changes in technology AND business processes, this architecture has to change. We see several users now using the same application at the same time accessing the same database(s).
Obviously, this architecture has to change to accomodate changes in the way applications are used.

Wednesday, August 7, 2013

Multi-Dimensional Arrays in Perl

Introduction to Arrays

A Perl array is a data type that allows you to store a list of items. You create them by assigning them to an array variable. The array variable is identified by a @ prefix. To define a list of dates, we do this:

@array = ('20020701', '20020601', '20020501');
This is a one-dimensional array.

Tuesday, August 6, 2013

Regular Expressions: Action, Pattern, Modifier

Introduction to Regular Expressions

In our introductory article on Perl Regular Expressions, we showed how regular expressions can cut down the code that you have to write. This article discusses the format of regular expressions.

Sunday, August 4, 2013

Perl Regular Expressions

Introduction to Regular Expressions

Regular expressions are used to match, change or translate strings against a pattern. In a traditional programming language, you will need to write a routine that scans your string and then do whatever you need to do. This approach is acceptable if the pattern is fairly simple. However, if your pattern is complicated, you will have to write a complicated routine to do your matching and comparing and translating.

Thursday, August 1, 2013

Introduction to Perl

What is Perl?

Perl was originally developed with an emphasis on system management and text handling. However, as it was revised, other features were included such as regular expressions, signals and network sockets. If you have programming experience in any language, you can easily learn Perl.