Tag Archives : perl

Get network interface transfer rate on Linux

Get network interface transfer rate on Linux

How can I get the current network interface transfer rate on a Linux box? I’ve been asked this question many times. There’re many ways to get this kind of info, and we’ll show some examples.
Avoid script running multiple times by file lock

Avoid script running multiple times by file lock

Sometimes we need a single instance of a script to run at a time. Meaning, the script itself should detects whether any instances of himself are still running and act accordingly. When multiple instances of one script running, it’s easy to cause problems. I’ve ever seen that about 350 instances [...]
Perl-5.11.0 released and what’s new

Perl-5.11.0 released and what’s new

Perl 5.11.0 was released yesterday (02/Oct/2009) , as well as a schedule for future 5.11.x releases. As a DEVELOPMENT release, Jesse Vincent encouraged testing of the new version, saying, “If you write software in Perl, it is particularly important that you test your software against development [...]
How to Check Sparse Files with Perl

How to Check Sparse Files with Perl

During my working period, my backup script is using rsync to copy files to remote server, and I have just realized that without some special parameter, rsync does not handle well on sparse files. (a.k.a Files with holes in them that are holding a file system and just take the space needed by their actual [...]
How to use Perl to check mount point?

How to use Perl to check mount point?

This is a Perl module that was posted in a comment by our friend Justy (a.k.a. the iSheep), it solves a problem that I’ve faced a lot, especially with Perl scripts that run as daemons, where you need to copy files to a mount point. but if the mount point has failed then you’re just copying the files [...]
List keys that of same values from a Perl Hash

List keys that of same values from a Perl Hash

Suppose that we have a hash like this: my %thehash = ( "abc" => {'a', 'office', '123'}, "cax" => {'s', 'domain', '254'}, "adm" => {'s', 'atwork', '254'}, "tec" => {'s', 'domain', '294'}, "ued" => {'s', 'domain', '254'} );
Common ways to install CPAN module

Common ways to install CPAN module

CPAN (Comprehensive Perl Archive Network) is a large repository of Perl modules, and it’s officially supported by Perl Community. Standard Perl already has many CPAN libraries installed from birth, but usually you have to install a few extra Perl modules, so that you can benefit from their new [...]
© 2006-2009 Admon Home. All rights reserved.
Powered by Linode Japan