How To Force Getopt::Long To Be Case Sensitive in Perl
erics, March 19th, 2014 |
1 |
use Getopt::Long qw(:config no_ignore_case); |
|
erics, March 19th, 2014 |
1 |
use Getopt::Long qw(:config no_ignore_case); |
erics, December 26th, 2013 CPAN Error: Undefined subroutine &IO::Uncompress::Base::readonly called at /usr/lib/perl5/site_perl/5.8.8/IO/Uncompress/Base.pm Looks like CentOS update installs an older version of the Scalar::Util so that Perl could not load the module. Download the Scalar::Util module and manually install it:
|
1 2 3 4 5 6 7 |
wget http://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/Scalar-List-Utils-1.35.tar.gz tar xvzf Scalar-List-Utils-*.tar.gz cd Scalar-List-Utils-* perl Makefile.PL gmake gmake test gmake install |
To test: perl -MCPAN -e ‘shell’ For more information, visit the CPAN Util.pm page. Original Post: http://www.perlmonks.org/?displaytype=print;node_id=965635;replies=1
erics, April 13th, 2012 I had to patch the distribution by adding the following variable into the code: $Config::Auto::Untaint = 1; Here is the fix on AWS Linux: vim /usr/local/share/perl5/CGI/Application/Plugin/ConfigAuto.pm 141 sub cfg { 142 my $self = shift; 143 144 if (!$self->{__CFG}) { 145 require Config::Auto; 146 $Config::Auto::Untaint = 1; (ADD THIS NEW LINE HERE)
erics, April 12th, 2012 For example, to see the version for DBD::mysql, do this: perl -MDBD::mysql -we ‘print $DBD::mysql::VERSION;’
erics, March 21st, 2012 Perl to the Rescue! This perl script cleans just one type of infection as an example. Vary the script to search for and clean other combinations and patterns. Also, the script is deliberately written long-hand and verbose, and could be significantly more compact and efficient. It was done this way for ease of use and […]
erics, December 30th, 2011 |
1 2 3 |
yum --enablerepo=epel install perl-Net-Amazon-EC2 perl-File-Slurp perl-DBI perl-DBD-MySQL perl-Net-SSLeay perl-IO-Socket-SSL perl-Time-HiRes perl-Params-Validate ca-certificates wget -O /opt/aws/bin/ec2-consistent-snapshot http://bazaar.launchpad.net/~alestic/ec2-consistent-snapshot/trunk/download/head:/ec2consistentsnapsho-20090928015038-9m9x0fc4yoy54g4j-1/ec2-consistent-snapshot chmod 0775 /opt/aws/bin/ec2-consistent-snapshot |
http://alestic.com/2009/09/ec2-consistent-snapshot http://www.thatsgeeky.com/2011/05/ec2-consistent-snapshot-on-amazons-linux-ami/ http://www.thatsgeeky.com/2011/06/rotating-ebs-snapshots-ec2-prune-snapshots/
erics, November 3rd, 2011 YMMV…
|
1 2 3 4 5 6 7 8 9 10 |
#!/usr/bin/perl use strict; $| = 1; our $LIMIT = shift || 5000; open (STDIN,"/usr/sbin/tcpdump -Atpn dst port 80 |"); while (<>) { last unless $LIMIT--; next unless /get|host|post|http|xml/i; print; } |
Additional Reading http://chaosreader.sourceforge.net/ http://www.id-snippet.com/3008/dump-http-packet-using-tcpdump-and-perl/ http://stein.cshl.org/~lstein/talks/WWW6/sniffer/ http://www.perlmonks.org/index.pl?node_id=254612
erics, October 28th, 2011 This solution is hyper-simplistic, and does not deal with decimals or real numbers (those with either a – or a + in front of them)…
|
1 2 3 4 5 |
if ($value =~ /^\d+$/) { ## $value is an integer } else { ## $value is NOT an integer } |
erics, October 27th, 2011 Your mileage may vary widely…
|
1 2 3 4 5 |
export AWS_CREDENTIALS_FILE=/root/aws/aws-credentials mkdir /opt/aws/bin cd /opt/aws/bin wget http://aws-catalog-download-files.s3.amazonaws.com/AmazonSES-2011-07-21.zip unzip AmazonSES-2011-07-21.zip |
CentOS
|
1 |
yum install libxml2-devel |
Ubuntu
|
1 2 3 4 5 6 7 |
apt-get install gcc apt-get install libssl-dev apt-get install libxml2-dev apt-get install libio-socket-ssl-perl apt-get install libnet-ssleay-perl apt-get install libnet-https-any-perl apt-get install liblwp-useragent-determined-perl |
For all OS
|
1 2 3 4 |
cpan CPAN YAML Digest::SHA URI::Escape Bundle::LWP MIME::Base64 Crypt::SSLeay XML::LibXML LWP::Protocol::https perl -e 'print "@INC;\n";' cp SES.pm {one path from above command} /opt/aws/bin/ses-verify-email-address.pl -l |
erics, October 24th, 2011 The below worked for me…
|
1 2 |
# yum repolist # yum install git --disablerepo=epel |
Here are the errors I was getting:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
root@dev:/root # yum install git Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * epel: mirror.symnds.com amzn | 2.1 kB 00:00 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package git.x86_64 0:1.7.4.1-1.el5 set to be updated --> Processing Dependency: perl-Git = 1.7.4.1-1.el5 for package: git-1.7.4.1-1.el5.x86_64 --> Processing Dependency: perl(Error) for package: git-1.7.4.1-1.el5.x86_64 --> Processing Dependency: perl(Git) for package: git-1.7.4.1-1.el5.x86_64 --> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.7.4.1-1.el5.x86_64 --> Running transaction check ---> Package git.x86_64 0:1.7.4.1-1.el5 set to be updated --> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.7.4.1-1.el5.x86_64 ---> Package perl-Error.noarch 1:0.17015-4.4.amzn1 set to be updated ---> Package perl-Git.x86_64 0:1.7.4.1-1.el5 set to be updated --> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-Git-1.7.4.1-1.el5.x86_64 --> Finished Dependency Resolution Error: Package: git-1.7.4.1-1.el5.x86_64 (epel) Requires: libcurl.so.3()(64bit) Error: Package: perl-Git-1.7.4.1-1.el5.x86_64 (epel) Requires: perl(:MODULE_COMPAT_5.8.8) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest |