DevTech101

DevTech101

perl

Testing DNS performance – perl script

Use the perl script below to check your DNS performance. Make sure to replace the search string and your DNS provider IP address. #!/usr/bin/perl @ns = @ARGV; push(@ns,’8.8.8.8′, ‘4.2.2.1’) unless @ns; $domain = “www.devtech101.com”; use Net::DNS; use Time::HiRes; # high resolution timing required use Time::Stopwatch; use Number::Format qw(:subs); use Statistics::Descriptive; tie my $time, ‘Time::Stopwatch’; # …

Testing DNS performance – perl script Read More »

Modifying perl config by hand – just modify Config.pm

The post below will show you how to generate the Config.pm Then if you still need configuration changes (for example proxy) just modify the file by hand. To initially configure perl cpan. Make note of the config file & directory, for example below its /user/.cpan/CPAN/MyConfig.pm perl -MCPAN -e shell [..] snip Would you like to …

Modifying perl config by hand – just modify Config.pm Read More »

perl how to change from string to a number

Below you can asee a subrutine that will cause perl to undrtsnad this as numbers foreach (@full_cpu_data) {         $_ =~ s/K//;         @cpu_data = split(':', $_);         @cpu_data  = map { $_ += 0 } @cpu_data;            push @cpu_plot, { cpu => @cpu_data[3], core => @uptime[6], disk => @disk[4] };         $i++; }  

Compiling DBD driver for informix

Contents 1 DBD::Informix Install Procedure 1.1 General Information 1.2 Informix Client SDK Download Info 1.3 Misc Links 1.4 Environment Information 1.5 Build Procedure DBD::Informix Install Procedure General Information The majority of the procedure must run as user informix. Only the make install runs as root. Make sure that the IP/hostname of the build server is …

Compiling DBD driver for informix Read More »

Show installed perl modules

To list all installed perl modules #!/usr/bin/perl # ## # #!/usr/bin/perl use ExtUtils::Installed; my $instmod = ExtUtils::Installed->new(); foreach my $module ($instmod->modules()) { my $version = $instmod->version($module) || “???”; print “$module — $version\n”; }