Add Me!Close Menu Navigation

My technical corner about Linux, Perl, programming, computer networks and network security

Add Me!Open Categories Menu

Currently Browsing

Perl

17 December
Posted in Perl

Efficiency in Perl – regular expressions

The regular expressions in perl are awesome. If you write in perl, you know this. But most programers don’t think about correct use of their power.     1) Don’t use a regular expression for very simple string comparisions Using if ( $somestring eq “ok” ) is much better than […]

10 June
Posted in Perl

Automate your testing with Perl – a simple example

Testing is one of the most important things during programming. Good testing saves your time and health. In Perl, there is the Test::More perl module for it, but many begginers programmers don’t know how to use it, because the standard examples is too simple a here.     The simplest: […]

1 June
Posted in Perl, Projects

SQLib – easy store your SQL queries in a separate file

In big commercial projects a separate some layers from a raw code is important. This is the typical advantages of almost each framework. Effects of this separation are templates, languages files, modules, etc. But not every framework supports separating SQL queries. I didn’t find any good (for me) perl module […]

5 May
Posted in Bash, Linux, Perl

Useful one-liners, part I

Find 1) Find the all files in the working directory (and subdirectories) if these have “*.doc” extension and execute some command. To do this, I use simple a regular expression and the echo command: find . -type f -iname “*.[dD][oO][cC]” -exec echo {} \;   2)┬áDelete all files and directories […]