Via pm-uninstall # Install pm-uninstall at the frist time / if not already exists perl -MCPAN -e “install App::pm-uninstall” #Uninstall Module example Net::SSLeay pm-uninstall -n Net::SSLeay Or use follwing script target=”_blank”>https://perltricks.com/article/3/2013/3/27/How-to-cleanly-uninstall-a-Perl-module: # uninstall_perl_module.pl from PerlTricks.com use 5.14.2; use ExtUtils::Installed; use ExtUtils::Packlist; # Exit unless a module name was passed die (“Error: no Module::Name passed as […]
Update Perl all CPAN Modules
by admin on 13/06/2014
perl -MCPAN -e “upgrade /(.\*)/” or cpan upgrade /(.*)/
HowTo find chinese or russian Spam encoded in UTF-8 with SpamAssassin (Chinese Russian Spam filter rules)
by admin_import on 03/06/2010
Normally SpamAssassin do not support UTF-8 by performance reasons: If it contains “utf8”, then that’s probably the problem. Change it so it does not contain “utf8” …, and the performance issues will clear up. Perl 5.8 uses Unicode character sets internally in this situation, and unfortunately, this greatly hurts performance of all Perl code which […]
List the perl modules installed on your box
by admin_import on 18/05/2010
By using ExtUtils::Installed # if ExtUtils::Installed not installed, please run first: perl -MCPAN -e ‘install ExtUtils::Installed’ perl -MExtUtils::Installed -MData::Dumper -e ‘my ($inst) = ExtUtils::Installed->new(); print Dumper($inst->modules());’ By using CPAN: #shows only Packages which needed an update perl -MCPAN -e ‘print CPAN::Shell->r ‘ Or use following script: I’m not a hard-core Perl monger, but I recently […]
Shell: Find and Repleace String over many files with Perl
by admin_import on 03/05/2010
From: https://snippets.dzone.com/posts/show/116 An equivalent of the other find-replace, except it’s a one-liner that generates no temp files, and is more flexible: perl -pi -e ‘s/find/replace/g’ *.txt Or, to change matching files in a hierarchy: find . -name ‘*.txt’ |xargs perl -pi -e ‘s/find/replace/g’ That didn’t work when the file names contained white space. This seems […]
Perl uniq function on array
by admin_import on 02/05/2010
my %seen; @array = grep !$seen{$_}++, @array;
Perl add thousand separators on string
by admin_import on 02/05/2010
#english with comma my $number_readable = () = $number =~ s/(d{1,3})(?=(d{3})+($))/$1,/g; #german with dot my $number_readable = () = $number =~ s/(d{1,3})(?=(d{3})+($))/$1./g;
Perl count lines of string
by admin_import on 02/05/2010
my $countlines = () = $string =~ m/n/gs;
Some good compact Reference Cards
by admin_import on 08/07/2008
Apache: Apache 1.3 Quick Reference Card https://refcards.com/refcard/apache-forda Checkpoint FW-1/VPN-1: German: Die 100 wichtigsten Check Point VPN-1-Kommandos https://www.galileocomputing.de/download/artikel/346/galileocomputing_poster_check_point_a3.pdf Cisco: Ciscopedia: A new Windows-Help-formatted File with a big Reference for Cisco command https://www.google.de/search?q=ciscopedia-v3 Perl: Perl Regular Expressions https://refcards.com/docs/trusketti/perl-regexp/perl-regexp-refcard-a4.pdf And some more see: https://refcards.com/