Entries Tagged as 'Perl'

Building Web Sites for Profit and Fun - Relevant References

The great paradox of the internet is information. The internet provides such a vast array of information that just about anyone can learn just about anything about just about any subject. On the other hand, without near infinite time to weed through it all, it becomes increasingly difficult to find reliable, pertinent, and quality information. The sheer volume has become both the benefit and the draw back. And with as many tech-savvy persons as there are out there, the amount of information pertaining to web design and development is astronomical. Throughout the years, I have gathered a list of sites I have tried and tested for valuable content and who I turn to for relevant references.
[Read more →]

Perl on Linux - Greedy Regular Expressions and the Question Marks that Tame Them

In 1986, Larry Wall invented a scripting language to solve the problems of generating reports for system administrators on unix. He called it the Practical Extraction and Reporting Language since that was its function. And it does do that. In a Unix based OS where everything is output in text, Perl has dominated somewhat because it so easy to use but mostly because of its powerful and easily used regular expression capabilities.
[Read more →]

Perl on Linux - Iterative, Forking, Multi-Request Handling Server

Every so often you want to do something cool in perl, like make your own server capable of handling multiple requests. And if you are developing any type of network server, this functionality is not only handy, but essential. And so, without much further adieu, let’s do this.
[Read more →]

Perl on Linux - Formatting Text and Reports

Surely one of the most annoying things about working in a non-gui environment is convenient formatting. We have all had output that was off due to tabs or new lines or variables that overran their boundaries in the output area, etc. Provisioning for such things can be tedious, time consuming, and highly annoying. Luckily for us, perl provides a text formatting feature that is built in and fairly easy to use.
[Read more →]

Perl on Linux - Bitwise Manipulations

Today’s attention is directed at one of the less well known and certainly one of the least understood and used areas of perl. Although direct manipulation of bits is the only thing that a computer really does, programmatic manipulation thereof has been abstracted out for all but the tasks that can only be solved by its use. Still, there are situations and times when it becomes necessary and proper for one bit to dissolve the logical bonds which hold them to the byte and to assume, amongst the operators and variables of the language, an equal station.
[Read more →]

Perl on Linux - Anonymous Hashes, Hash References, and Passing Them to Subroutines.

There comes a time in every perl programmers life when they have to master the hash. Anyone who has programmed in Perl for very long has run into problems such as subroutine arguments getting confusing, lagging programs due to hash tables being copied over and over, and searched for a simpler way to maintain and access data. All this and more can be achieved by the simple use of anonymous hash tables and the passing of hash table references to subroutines for processing.
[Read more →]

Perl on Linux - Making a Daemon

It's me!One if the nice advantages to linux is the ability to create daemons relatively quickly and get them to do your brute and routine work for you. For this example, I am going to use perl to create the daemon, since perl is the glue that holds the bricks of linux together. Its regex functionality combined with fast and easy syntax makes it almost too easy to use for quick and dirty programming in the text based realm of linux. So without further adieu, the daemon:
[Read more →]

Debugging On Linux - Strace & Cpanel

Last week, I went over the basics of strace and some very simple examples of it’s use. So this week I thought I would demonstrate a very useful use of strace in problematically duplicating the functions of cpanel’s WHM web interface. This will allow you to do anything WHM does through the browser via the command line or in a daemon.
[Read more →]